Thread: date column
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default date column

This uses column 3 (C) as the date column. Right click on the sheet tab and
select view code. Paste in code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrHandler:
If Target.Count 1 Then Exit Sub
If Target.Column < 3 Then
Application.EnableEvents = False
Cells(Target.Row, 3).Value = Now
Cells(Target.Row, 3).NumberFormat = "mm/dd/yy hh:mm"
Columns(3).AutoFit
End If
ErrHandler:
Application.EnableEvents = True
End Sub

--
Regards,
Tom Ogilvy

"jamie85 " wrote in message
...
I want a date column which shows the date of when data was entered in
that row. How is this done? Thanks.


---
Message posted from http://www.ExcelForum.com/