Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all,
I need somebody to help me find the appropriate equation to do the following: When an employee selects his name from the drop down list in the cell F1,today's date appears in A1 and time() in B2. On the next day if an employee wants to change his name in the cell F1 and selects another name,the date and time written in A1 and B2 DON'T change. In other words,when users enter their names in F1 ,if A1 Is Null then A1=today() and if B1 Is Null then B1=NOW(). |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
You could use a modification of the code that Bob Philips provided for you Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "F1" On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then If Range("A1") = "" Then Range("A1") = Date End If If Range("B1") = "" Then Range("B1") = Format(Now, "hh:mm") End If End If ws_exit: Application.EnableEvents = True End Sub -- Regards Roger Govier "Pietro" wrote in message ... Hi all, I need somebody to help me find the appropriate equation to do the following: When an employee selects his name from the drop down list in the cell F1,today's date appears in A1 and time() in B2. On the next day if an employee wants to change his name in the cell F1 and selects another name,the date and time written in A1 and B2 DON'T change. In other words,when users enter their names in F1 ,if A1 Is Null then A1=today() and if B1 Is Null then B1=NOW(). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions | |||
Combined date time cell to separate date & time components | Excel Discussion (Misc queries) | |||
Combined date time cell to separate date & time components | Excel Discussion (Misc queries) | |||
Combined date time cell to separate date & time components | Excel Discussion (Misc queries) | |||
Combined date time cell to separate date & time components | Excel Worksheet Functions |