What cell is the formula in?
What column can we look in to see where the data ends?
Sub ExtendFormulaInCellA2()
Dim LastRow As Long
LastRow = Cells.Find("*", , xlValues, , xlRows, xlPrevious).Row
Range("A3:A" & LastRow).Formula = Range("A2").Formula
End Sub
Does this macro do what you want...
Code:Sub ExtendFormulaInCellA2() Dim LastRow As Long LastRow = Cells.Find("*", , xlValues, , xlRows, xlPrevious).Row Range("A3:A" & LastRow).Formula = Range("A2").Formula End Sub
I have another sheet with formulas in Cell N83 from Column N all the way up into Column X. How can I autofill Columns N:X to the last row of data in Column A?
Sub ExtendFormulaInCellA2()
Dim LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("N84:X" & LastRow).Formula = Range("N83:X83").Formula
End Sub