nicholasho
New Member
- Joined
- Oct 10, 2005
- Messages
- 6
Hi,
I like to define a range to cover a column in a sheet. One of the method is as follows:
Set LookupSheet = Worksheets("Sheet5")
LookupLastRow = LookupSheet.Range("A65536").End(xlUp).Row
Set RangeOne = Worksheets("Sheet5").Range("$AX$2:$AX$(LookupLastRow)")
The last statement has syntax error with LookupLastRow. What's the syntax to retrieve the variable value and used in the range definition?
Thanks and Regards
Nick
I like to define a range to cover a column in a sheet. One of the method is as follows:
Set LookupSheet = Worksheets("Sheet5")
LookupLastRow = LookupSheet.Range("A65536").End(xlUp).Row
Set RangeOne = Worksheets("Sheet5").Range("$AX$2:$AX$(LookupLastRow)")
The last statement has syntax error with LookupLastRow. What's the syntax to retrieve the variable value and used in the range definition?
Thanks and Regards
Nick