Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I get dates automaticaly inserted when editing excell

I have a spread sheet sent to me monthly and the people sending it will not
tell us when and what line they have updated. There are currently 15000+
lines and we will have upwards of 70 thousand lines when done with this
project. I want to know how they can add a column and then everytime they
update a line it would automatically add the date.

Alan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default How do I get dates automaticaly inserted when editing excell

Alan,

You need to use a worksheet change event to do that: for example, for
any cell in columns A:Z, the date when the entry is made or changed is stored in column AA
using this code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
If Intersect(Target, Range("A:Z")) Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each myCell In Intersect(Target, Range("A:Z"))
Cells(myCell.Row, 27).Value = Now
Cells(myCell.Row, 27).NumberFormat = "mm/dd/yy hh:mm:ss"
Next myCell
Application.EnableEvents = True
End Sub

Copy this code, right-click on the worksheet tab, select "View Code" and
paste the code in the window that appears.

Additionally, you could shade the actual cell that changed by adding this within the For Next loop:

myCell.Interior.ColorIndex = 3

HTH,
Bernie
MS Excel MVP


"Alan Johnson" wrote in message
...
I have a spread sheet sent to me monthly and the people sending it will not
tell us when and what line they have updated. There are currently 15000+
lines and we will have upwards of 70 thousand lines when done with this
project. I want to know how they can add a column and then everytime they
update a line it would automatically add the date.

Alan



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
Can you make excell automaticaly save to the current date & time? Jim Excel Discussion (Misc queries) 3 May 17th 07 04:49 PM
editing documents with excell that are not excell format Jim Excel Discussion (Misc queries) 1 May 8th 06 06:31 PM
questionnaire on web, import answer into excell automaticaly oregon district youth New Users to Excel 1 December 1st 05 02:41 PM
I can not print jpeg pics. inserted in my excell sheets. Chopper Excel Discussion (Misc queries) 0 August 29th 05 03:11 PM
Automaticaly entering static dates Tinker Excel Discussion (Misc queries) 6 April 9th 05 12:53 AM


All times are GMT +1. The time now is 11:31 PM.

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"