Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Auto insert Date & Time when another cell is populated

Is there any way I can populate the column AV in my spreadsheet with the Date
and Time once a value has been entered in column AV and keep this original
value. Can I protect this original value from being changed?

I can insert the date and time wiht the Now() function but this updates so
does not serve our purpose.
Thanks heaps
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Auto insert Date & Time when another cell is populated

Try JE McGimpsey's coverage of "Time and date stamps" at his page:
http://www.mcgimpsey.com/excel/timestamp.html

A sample implemented with JE's first sub (below) is available at:
http://savefile.com/files/41920
Date_Time_Stamping.xls

---------
Steps:
Right-click the sheet tab Choose View code
Clear the defaults, and paste-in JE's code below
(from: http://www.mcgimpsey.com/excel/timestamp.html)
Press Alt+Q to get back to Excel

Test it out. When you input entries into A2:A10, the date/time stamp will be
logged into col B. Clearing entries will clear the corresponding stamps.
Adapt the range to suit: Range("A2:A10").

'-------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
'------
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Trixie" wrote:
Is there any way I can populate the column AV in my spreadsheet with the Date
and Time once a value has been entered in column AV and keep this original
value. Can I protect this original value from being changed?

I can insert the date and time wiht the Now() function but this updates so
does not serve our purpose.
Thanks heaps

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto update a cell with a current date Kell2604 Excel Discussion (Misc queries) 2 June 23rd 06 09:18 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM


All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"