![]() |
Auto entry clock into a cell on tabbing into it
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? |
Auto entry clock into a cell on tabbing into it
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. -- Gary''s Student - gsnu200719 |
Auto entry clock into a cell on tabbing into it
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 "Gary''s Student" wrote: 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. -- Gary''s Student - gsnu200719 |
Auto entry clock into a cell on tabbing into it
Hi
Try CTRL+SHIFT+SEMICOLON (Ctrl : ) to give the current time -- Regards Roger Govier "John" wrote in message ... 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 "Gary''s Student" wrote: 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. -- Gary''s Student - gsnu200719 |
All times are GMT +1. The time now is 02:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com