Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Link cells when initials are entered, it time stamps the next???
Please tell me if it's possible to link 2 cells when you enter initials in
one cell, it will date/time stamp the linked cell....Is this possible? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Link cells when initials are entered, it time stamps the next???
Sammie
You can use event code to achieve this. Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1")) Is Nothing Then With Target If .Value < "" Then Range("F1").Value = Format(Now, "dd mmm yyyy hh:mm:ss") End If End With End If ws_exit: Application.EnableEvents = True End Sub This is worksheet event code. Right-click on the sheet tab and "View Code". Copy/paste the above into that sheet module. When you enter something in A1, F1 will show date/time of entry. For a range of cells use......... Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1:A20")) Is Nothing Then With Target If .Value < "" Then .Offset(0, 5).Value = Format(Now, "dd mmm yyyy hh:mm:ss") End If End With End If ws_exit: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Fri, 13 Apr 2007 12:56:03 -0700, Sammie wrote: Please tell me if it's possible to link 2 cells when you enter initials in one cell, it will date/time stamp the linked cell....Is this possible? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Link cells when initials are entered, it time stamps the next?
OK Gordon, I am totally lost.....what exazctly do I have top paste into the
cell? (without all the extra stuff)!!! I really appreciate the info, and I thought I was an advanced user!! you just showed me I wasn't!~~ LOL "Gord Dibben" wrote: Sammie You can use event code to achieve this. Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1")) Is Nothing Then With Target If .Value < "" Then Range("F1").Value = Format(Now, "dd mmm yyyy hh:mm:ss") End If End With End If ws_exit: Application.EnableEvents = True End Sub This is worksheet event code. Right-click on the sheet tab and "View Code". Copy/paste the above into that sheet module. When you enter something in A1, F1 will show date/time of entry. For a range of cells use......... Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1:A20")) Is Nothing Then With Target If .Value < "" Then .Offset(0, 5).Value = Format(Now, "dd mmm yyyy hh:mm:ss") End If End With End If ws_exit: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Fri, 13 Apr 2007 12:56:03 -0700, Sammie wrote: Please tell me if it's possible to link 2 cells when you enter initials in one cell, it will date/time stamp the linked cell....Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Time Stamps??????????? | Excel Discussion (Misc queries) | |||
Sorting data with time stamps | Excel Discussion (Misc queries) | |||
I need to find the yy/mm/dd AND hh:mm:ss between 2 time stamps | Excel Discussion (Misc queries) | |||
multiple time stamps on worksheets | Excel Discussion (Misc queries) | |||
DIFFERENCE BETWEEN TWO TIME STAMPS AS DECIMAL | Excel Discussion (Misc queries) |