Thread: excel help
View Single Post
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi

you need to either enter the date & time manually
control & ; (semi-colon) will give you the date
and
control & shift & ; will give you the time
you can put these two in the same cell by pressing spacebar between them
.....

or you can use worksheet_change code which runs whenever the value in A1 is
changed (in the following code the date & time will be put into cell B1)
-----

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.address = "$A$1" And Not IsNull(Target.Value) Then
Target.Offset(0, 1).Value = Now
End If

End Sub
---

to use this code, right mouse click on the sheet tab of the sheet you're
dealing with and choose view code,
copy and paste the code on the right hand side screen then use ALT & F11 to
return to your workbook.

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
wrote in message
oups.com...
I am in need of a formula to develope a timestamp of sorts. I want to
check cell A1 for any data and then automatically input the date and
time the data was entered. I have tried the formula

=IF(A1<"",NOW(),"")

The problem with the now command is that it updates with each
calulation. I need the date and time to be fixed.


Rick