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

D

D4WNO

Hi all,

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

For example, cell A1 contains text and cell A2 is where I wish the dat
to show
If cell A1 text changes, is deleted etc then I'd like to have cell A2 t
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 advanc
 
C

Claus Busch

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top