MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Macro to put date at the end of a row


Posted by Casey Frankenberger on January 09, 2002 1:54 PM

Hello,
I've been trying to figure out how to create a macro using VB that would,for a row, read the first column of a spreadsheet, and if there is an entry, place the present days date in the second column. If not then it just skips ahead to the next row and does it again. Maybe 100 times. If anyone could give me any insight into how to do this I would greatly appreciate it.
Thanks
Casey


Posted by Jacob on January 09, 2002 2:54 PM

Hi

Sub DateInput()

For x = 1 To Range("A65536").End(xlUp).Row

If Range("A" & x) <> "" Then
Range("B" & x).FormulaR1C1 = Date
Else
End If

Next x

End Sub


HTH

Jacob

Posted by CAsey on January 10, 2002 6:58 AM

I cant thank you enough. It works great.
Thanks again
Casey