View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
mudraker
 
Posts: n/a
Default Copy a formula down in a macro


Just modify the formula to equal your lookup formula

Sub Macro1()

Dim LastRow As Long
LastRow = Cells(Rows.Count, "a").End(xlUp).Row
Range("a1").Value = "=b1+1"
Range("a1:a1").AutoFill _
Destination:=Range("A1:A" & LastRow), Type:=xlFillDefault
End Sub


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=548381