Changing Cell Info, Date tracks when cell changed

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

canadianwrx

Thread Starter
Joined
Mar 24, 2005
Messages
5
I want to have a range of cells store something. When one of those cells data is changed, I need another cell to show the date of when the cells data was changed automatically. For example: If Someone changes cell B2, A2 will show the date B2 was changed. Or B78 changes, A78 should show what date B78 changed. I need this to happen for the entire column. Is there a way to have this happen automatically? Please help, if you can.
 
Joined
Aug 30, 2003
Messages
2,702
It's mainly a question of how bulletproof you need it.

You could unlock all cells bar column A & then protect the sheet.

(Cells are locked by default ; press CTRL+A to select the whole sheet, then Format -- Cells -- Protection & uncheck "Locked", click OK. Then select all of column A (CTRL+SpaceBar), then Format -- Cells -- Protection & check "Locked", click OK).

Then use eg:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
ActiveSheet.Unprotect
Target.Offset(0, -1) = Date
ActiveSheet.Protect
End Sub

in the worksheet module.

HTH,
Andy
 

canadianwrx

Thread Starter
Joined
Mar 24, 2005
Messages
5
I talked to one of the programmers here at work. This is what he did and it works fine.

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column = 10 Or Target.Column = 9 Then
Cells(Target.Row, 8) = Date
End If

End Sub

I appreciate your help though.
 
Joined
Aug 30, 2003
Messages
2,702
>> This is what he did and it works fine.

For sure. If it doesn't matter that the someone who changes the cell can straight off change or delete the date in column 8, then everyone's happy. I just have a thing about pointing out pitfalls.

:),
Andy
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top