P
Pete K
Overall I'm trying to use a variable to set a range so that I can
autofill based on the number of rows in the spreadsheet.
I've set SprdshtPosition as an interger.
Range("I40000") = "=COUNT(R[-39999]C:R[-1]C)"
SprdshtPosition = (Range("I40000") + "1")
'SprdshtPosition will equal only a number ex:3456
Sprdsht_N
f_Rows = ("A2:A") & SprdshtPosition
'Sprdsht_N
f_Rows will = A2:A3456
Why doesn't one of the following work?
Selection.AutoFill Destination:=Range("A2:A") & SprdshtPosition
-or-
Selection.AutoFill Destination:=Range Sprdsht_N
f_Rows
autofill based on the number of rows in the spreadsheet.
I've set SprdshtPosition as an interger.
Range("I40000") = "=COUNT(R[-39999]C:R[-1]C)"
SprdshtPosition = (Range("I40000") + "1")
'SprdshtPosition will equal only a number ex:3456
Sprdsht_N
'Sprdsht_N
Why doesn't one of the following work?
Selection.AutoFill Destination:=Range("A2:A") & SprdshtPosition
-or-
Selection.AutoFill Destination:=Range Sprdsht_N