Automatic Time from text

J

Jakes

I have an excel document used for tracking all incoming calls, Every time a
call comes in and the name is entered into column B I would like a script to
automatically enter the time into column A.

Thanks in advance for the advice
 
M

Mike H

Hi,

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("B:B")) Is Nothing Then
Application.EnableEvents = False
Target.Offset(, -1).Value = Time
Application.EnableEvents = True
End If
End Sub

Mike
 
J

Jakes

Hi Mike,

Thanks for the response, Excel keeps telling me my security settings are too
high, I have dropped them to the lowest setting but it still won't let me run
the macro.

Any suggestions

Thanks
 
J

Jakes

Never mind thanks, I saved the document closed excel and re-opened it and it
worked fine.

Thank you so much
 
Top