AutoFilling To A Variable Number Of Rows
Sub tst()
' find first non emty cells in column A from bottom up (r)
r = Cells(65500, 1).End(xlUp).Row
Range("C1").Select
ActiveCell.FormulaR1C1 = "=RC[-2]/RC[-1]"
Range("C1").Select
Selection.AutoFill Destination:=Range("C1:C" & r), Type:=xlFillDefault
End Sub
|