View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Alias for =today()

You could right-click the sheet tab, select view code and insert the
following code. Change C5 (in the code) to the appropriate cell.
The $ signs are required.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo LeaveSub
Application.EnableEvents = False
If Target.Address = "$C$5" And Target.Value = "T" Then
Target.Value = Date
End If
LeaveSub:
Application.EnableEvents = True
End Sub
'------------


"Luke Slotwinski"

wrote in message
I have a column formated for simple date. I'd like to be able to enter "T"
in the cell and have it automatically insert the current date, when leaving
the cell. Essentially replacing "T" with =today(). What would be the most
efficient way of going about this.

Thank you,
Luke Slotwinski