Auto entry clock into a cell on tabbing into it

J

John

How do you have a cell auto fill with a real time and then remain fixed to
indicate when a operator carried out an entry?
 
G

Gary''s Student

Let's use cell B9 as an example:

In worksheet code enter the following:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("B9"), Target) Is Nothing Then
If IsEmpty(Target) Then
Target.Value = Now()
End If
End If
End Sub


If you tab into B9 and it is empty, the time will automatically be entered.

If it is not empty, nothing changes.


REMEMBER: worksheet code, not a standard module.
 
J

John

Oh Wow!

Sorry but this has gone right over my head I'm sorry to say. Is this
something that can be simplified so it becomes a formula entered into the
cell??

Thanks John
 

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