Copy the code below, right click the sheet tab, select "View Code" and paste the code into the
window that appears.
This code will put the date into column A of any row where data is entered IF that cell is currently
blank.
HTH,
Bernie
MS Excel MVP
Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(Target.Row, 1).Value <> "" Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, 1).Value = Date
Application.EnableEvents = True
End Sub
I appreciate the response very much Bernie. However this would appear to work
for a worksheet. I am attempting to get the date into a dataform that is to
be populated and can't enter a formula directly into the form. The worksheet
is only populated when Enter is pressed but the date would have already been
entered into the dataform.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.