Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula for Revised Date 2

Status
Not open for further replies.
May 5, 2005
39
US
Hi all, one of my co-workers is trying to figure out a way to have a date on a cell that will show the last revised date, not the current date. Is there a simple formula that will do this? I googled and searched but couldn't find anything.

Also, It would be when a change was made and saved on a worksheet and it would be on a worksheet or a row (if that makes sense). Sorry I am getting this second hand and the end user is an Excel Newbie.

Many thanks and to SkipVought to pointing me here w/ my question.
 
Here's code to add a DateStamp: faq707-1657

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 



Right-click the sheet tab, select View code

You are now in the VB Editor, on the Code Sheet for the Worksheet Object. (Notice ctr+R the VBA Project Explorer)

Above the Code Window are two dorp down controls - the LEFT is the Object control, either (General) or Worksheet, and the RIGHT is the Procedure control.

Select Worksheet from the object control.

Select Change from the Procedure control. Now you see...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

End Sub
[code]
This is the event stub for the Worksheet Change event.  Every CHANGE on range values in this sheet will be reflected in the Target Range object.

Back to your sheet.

Explain in detail, how you want the Date/Time to be inserted.  Exactly where, under what conditions.

For instance you may have a table in columns A thru C, and any change in the values in columns A - C, would have the current Date/Time recorded in column D, in the row that was changed, with the exception of ROW 1 which has headings.


Skip,
[sub]
[glasses]Did you hear what happened when the OO programmer lost his library?...
[b]He's now living in OBJECT poverty![/b][tongue][/sub]
 
Thanks both of you. All I need is the date and time it was revised. It would be whenever anyone changed text or numbers on the spreadsheet, or whenever anyone added a row or column to the spreadsheet.

I did a test run on one of my sheets and it seems to have worked just as I wanted it to.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top