I am trying to document in an excel what days I do a certain thing. So I want to have the date and time inserted in a cell lets say A2 when I type in lets say B2 And I want that to continue down the column on both a and b. So the date is inserted when corresponding cell has characters in it. Any ideas? for a macro or VBA code?
thanks guys.
Hi and welcome to the forum.
Put the following in the Worksheet Change event (F11 to the Visual Basic Environment, double click the sheet in question, from the left hand drop down select 'Worksheet' and in the right hand drop down select 'Change'
HTHCode:Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("B:B")) Is Nothing Then Range("A" & Target.Row) = Format(Date, "mm/dd/yy") & "_" & Format(Time, "h:m:s") End If End Sub
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
thanks alot man. that worked flawlessly. thanks soooo very much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks