View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
[email protected] jsofillas@gmail.com is offline
external usenet poster
 
Posts: 17
Default Can you "Time Stamp" in Excel?

On Wednesday, April 15, 2015 at 2:26:06 PM UTC-4, Claus Busch wrote:
Hi,

Am Wed, 15 Apr 2015 11:19:05 -0700 (PDT) schrieb :

Cell L115 is blank. I would like cell M115 to have the time stamp. If I type an x in cell L115, I would like cell M115 to show 04/15/15. Even if I open the file tomorrow I would still want M115 to show 4/15/15. Thanks.


right click on the sheet tab = Show Code and insert following code into
the code window of the sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$L$115" Then Exit Sub

With Target.Offset(, 1)
If Target = "x" Then .Value = Date
.NumberFormat = "MM/DD/YY"
End With
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional




Ok, thanks! I understand now and am getting it to work. However, I thought this would be more of a formula than a format. Let's say I have multiple tabs that this would apply to where the X's would be all done in column L and I would need the time stamp to show in Column M in the row. How would that get applied to the entire worksheet? Thanks for your help.