frank_m
12-14-2010, 06:34 PM
Edit: Never mind, I had a typo with Range("N16").AutoFill Range("N16:J" & LastRow - 1) should be N not J :rofl:
Corrected that and it works fine
-------------------------------------------------------------------------------------------------------
Hi,
I am creating a formula in Cell N16 and need to copy that formula down about 20,000 rows to one row less than the last row in Column N
I am using Column B as the column to determine the last row because it always has data.
I am trying to use AutoFill to perform the task, but I guess I'm using it incorrectly as it is not doing anything.
I have verified the formula is correct in cell N16 and I have verified that the Last row is determined correctly.
Dim LastRow As Long
LastRow = ActiveSheet.[B65536].End(xlUp).Row
Range("N16").FormulaR1C1 = "=RC[-5]*RC[-2]+RC[-4]"
Application.ScreenUpdating = False
'''''''''''''''''''''''''''''''''''''''''''''''''Edit: Solved typo by replacing the J with N
Range("N16").AutoFill Range("N16:N" & LastRow - 1) 'Range("N16").AutoFill Range("N16:J" & LastRow - 1)
Application.ScreenUpdating = True
Corrected that and it works fine
-------------------------------------------------------------------------------------------------------
Hi,
I am creating a formula in Cell N16 and need to copy that formula down about 20,000 rows to one row less than the last row in Column N
I am using Column B as the column to determine the last row because it always has data.
I am trying to use AutoFill to perform the task, but I guess I'm using it incorrectly as it is not doing anything.
I have verified the formula is correct in cell N16 and I have verified that the Last row is determined correctly.
Dim LastRow As Long
LastRow = ActiveSheet.[B65536].End(xlUp).Row
Range("N16").FormulaR1C1 = "=RC[-5]*RC[-2]+RC[-4]"
Application.ScreenUpdating = False
'''''''''''''''''''''''''''''''''''''''''''''''''Edit: Solved typo by replacing the J with N
Range("N16").AutoFill Range("N16:N" & LastRow - 1) 'Range("N16").AutoFill Range("N16:J" & LastRow - 1)
Application.ScreenUpdating = True