View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
excelent excelent is offline
external usenet poster
 
Posts: 695
Default 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