A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Need to auto-enter last updated date, only if another cell has changed



 
 
Thread Tools Display Modes
  #1  
Old July 13th 12, 02:02 PM
D4WNO D4WNO is offline
Junior Member
 
First recorded activity by ExcelBanter: Jun 2012
Posts: 12
Default Need to auto-enter last updated date, only if another cell has changed

Hi all,

I hope you can help - I know how to auto-update a field with today's date when saving a file, but I need to instead enter today's date only when the field next to it has been altered.

For example, cell A1 contains text and cell A2 is where I wish the date to show
If cell A1 text changes, is deleted etc then I'd like to have cell A2 to update from whatever date it was previously, to todays date.

Then the same for B1 and B2, C1 and C2 etc

I hope this makes sense, thank you in advance
Ads
  #2  
Old July 13th 12, 02:49 PM posted to microsoft.public.excel.programming
Claus Busch
external usenet poster
 
Posts: 940
Default Need to auto-enter last updated date, only if another cell has changed

Hi,

Am Fri, 13 Jul 2012 13:02:47 +0000 schrieb D4WNO:

> For example, cell A1 contains text and cell A2 is where I wish the date
> to show
> If cell A1 text changes, is deleted etc then I'd like to have cell A2 to
> update from whatever date it was previously, to todays date.
>
> Then the same for B1 and B2, C1 and C2 etc


paste following code in the code module of the worksheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("1:1")) Is _
Nothing Then Exit Sub

Target.Offset(1, 0) = Date

End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto enter current date in cell when another changed Andy Smith[_3_] Excel Worksheet Functions 7 June 24th 09 10:53 PM
How to auto insert date in one cell when another is changed Jim Excel Worksheet Functions 1 September 5th 08 12:02 PM
auto enter date when another cell populated? zim New Users to Excel 6 March 2nd 07 05:40 PM
Auto enter date when data in enter in another cell Brian Excel Worksheet Functions 5 December 7th 06 06:44 PM
How to auto-enter date when cell is clicked? Ron M. Excel Discussion (Misc queries) 4 October 22nd 05 08:32 PM


All times are GMT +1. The time now is 07:00 AM.


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