Option Explicit
Sub testme()
Dim LastRow As Long
With Worksheets("sheet1")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range("c1:C" & LastRow).FormulaR1C1 _
= "=rc[-2]-rc[-1]"
End With
End Sub
vumian wrote:
>
> i have 2 col
> - fisrt and second col contain value (exiset already)
>
> How to use VBA to minus them an drag down at third col to end of row of
> col 1 or 2
>
> EX: col 1 and 2 have 1000 rows
> therefore, col 3 will be 1000 result rows automatically
> Thanks for your help .
>
> --
> vumian
> ------------------------------------------------------------------------
> vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
> View this thread: http://www.excelforum.com/showthread...hreadid=563001
--
Dave Peterson
Bookmarks