automate date entry

  • Thread starter Thread starter medavino
  • Start date Start date
M

medavino

i am using excel 2003 and need to automatically insert date into a cell when
i update info in a row.
others need to know how current data in a row is.
any thoughts out there?
please keep in mind that although not a total beginner, certain areas in
excel i have never used.
thanks in advance.
 
thank you. with modifications it works except that i need the date/time to
enter and then become constant and not update.
is that possible?
 
Which of the methods suggested there are you using? Don't they each remain
constant? Perhaps you need to look again at your modifications.
 
hi david.
once the function NOW is used it automatically updated when s/s is open or
f9, etc.
i used their formula
=IF(A1="","",IF(B1="",NOW(),B1))
my formula is
=IF(AL3=1,NOW(),"")
 
So in your change you removed the circular reference which stopped it from
updating. Read again the page to which you were referred (which explains
how the methos works), and try the method suggested there.
 
I have reread it several times but don't understand most of it. How / where
do I get the macro into s/s? Want to see if that works.
Thanks
 
Tell us *exactly* where you want the date to appear and tell us *eactly*
what cell(s) this is based on. For example:

Whenever a change is made in the range A1:J1 enter the date in cell L1.
 
medavino

Right-click on the worksheet tab and "View Code"

Copy/paste this code into that sheet module.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
With Target
If .Value <> "" Then
.Offset(0, 1).Value = Format(Now, "dd mmm yyyy hh:mm:ss")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

Any time you make a change in a cell in A1:A10 range, the date/time will appear
in corresponding cell in column B


Gord Dibben MS Excel MVP
 
hi gord.
this was great code but i need range to be a1:aj1 and date to be in ak.
i have over 4000 rows that i need date to always appear in col ak.
how do i change code?
thanks.
 
Back
Top