View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Problem recording entry time

Hi,

To get a static time right click your worksheet, view code and paste this
code in. Any entry in column A makes column B populate with a static NOW

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Application.EnableEvents = False
With Target.Offset(, 1)
.Value = Now
.NumberFormat = ("dd/mm/yyyy hh:mm")
End With
Application.EnableEvents = True
End If
End Sub

Mike

"JR Hester" wrote:

xecel 2007 on WindowsXP
I need to time stamp entries in a spreadsheet. I thought the NOW() function
would do teh trick, but alas, I was mistaken. In column "B" I used the
formula
=if(A#0, NOW(), "")
which worked great, until I moved to the next line and made an entry into
column A, that is when the both entries in column B were updated to the
current time.

Is there a way to record the time a cell changes from empty to non empty
status, without updating every other cell in the column? We are simply
attempting to automate a call log-- shouldn't be this difficult.

Anyone have a solution for my little mind twister today

Thanks in advance for the fantatsic help this forum provides