View Single Post
  #2   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

You need an event code.

Right click on the sheet name tab and go to view code, and enter the
following code:


Private Sub Worksheet_Change(ByVal Target As Range)

if Target.Row = 1 then Exit Sub

If Target.Column = 1 Then
Cells(Target.Row, "D") = Now()
End If

If Target.Column = 2 And Target.Value = "A" Then
Cells(Target.Row, "E") = Now()
End If

End Sub


Assumptions:
Your data starts from cell A1.


Mangesh


"Philip" wrote in message
...
Hello Friends

Now this is a very simple concern that I put forth but which seemingly

takes
a long time to answer!!

Well, lets look at the table below :

Order Status st Time End Time Time lapsed
112345 A 11:30 11:50 0:20
12456 N 11:55 12:40 0:45

Now, I want the third field(st Time) to show the current time when a user
enters the first field(Order) and field four(End Time) to show the current
time when a user enters the second field(Status) but only for Status 'A'.
Simple!!

Well, if so please help. I used the now() function but all cells keep
changing when a new cell is entered.

Thank you

Philip Jacob
Senior Executive Quality Appraisal
First American Corporation