Macro to extend formulas
Sub Auto_Fill()
Dim lRow As Long
With ActiveSheet
lRow = .Range("C" & Rows.Count).End(xlUp).Row
.Range("D1:F" & lRow).FillDown
End With
End Sub
Assumes you have pre-entered the formulas in D1:F1
Gord Dibben MS Excel MVP
On Wed, 16 Dec 2009 12:43:01 -0800, Joe M.
wrote:
I am trying to create a macro to extend formulas in columns downward to the
last filled adjacent cells. i.e. Col A thru C are filled down to row 120. Col
D thru F Row 1 contains the formulas to be extended down to row 120. The
problem is that when I record a macro it refers to specific cells. The last
row filled in Cols A-C is dynamic but when I run the macro it extends the
formula down to the same place each time. I have read some posts that refer
to a "Relative Reference" option in the Stop Recording toolbar but I don't
have this. I am using Access 2003. Any suggestions are greatly appreciated!
Thanks,
Joe M.
|