Data Input Date

T

Torres

Hi,

I was wondering if there is a way to have two columns. One of them wil
be filled by the user to input data. The other will display the dat
entry date automatically. Obviously I know of the Today() function. Bu
this is no use to me as everytime I open the sheet the dates wil
change
 
G

Gary''s Student

Say the data goes in column A and we want the date automatically entered in
column B. Put this worksheet event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A:A")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Offset(0, 1) = Date
Application.EnableEvents = True
End Sub
 

Ask a Question

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.

Ask a Question

Top