Hi ppz,
i'm trying to use 2 cell references to form a range selection to autofill in a formula.
The 2 cells are simply the 1st data cell & last data cell in a column. I want to enter a formula in the 1st cell & have a bit of VBA autofill the rest of the column. I created a macro to see the code when i manually do this. It creates a code usiong the Selection.Autofill command being used. When i try to use this with my code i get an error. Error i get states 'Autofill Method Of Range Class Failed'.
I'm not sure what i'm doing wrong but my code is below:
TO_WORKSHEET is the worksheet i am using
strFormula is the formula string created
strFormulaRangeValue is the range to select for the autofill of the formula
intLastRowCount is a count of the last row with data in it.
Please could you help with this issue? If you know of a better method of using VBA to autofill in columns then please let me know.
Thanks,
Shuja
Bookmarks