How can I determine the modification date of a cell?

R

robrowe

I'm creating a prioritized list using Excel 2003 that will be updated
periodically. I would like to know if there is a way to capture the last date
when a priority was changed. For example, if A1 contains a priority of level
1, then B1 would contain the date of when I entered that priority. Now, let's
say after a few weeks that priority is changed to level 2, I now want B2 to
show the new date of when the change to 2 was made. Any ideas on how to do
this?
 
R

Rick Rothstein

Clarification please... Is A1 the only cell that is being monitored? If so,
are you listing the dates a changed was made in a running list down Column
B? I ask because your post said B1 for the first change and B2 for the
second change, but only ever mentioned A1 as the priority cell.
 
S

Shane Devenshire

Hi,

Here is some sample code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1:A100"))
If Not isect Is Nothing Then
Target.Offset(0,1) = Date
End If
End Sub
 
G

Gord Dibben

Shane

I would click on the "maybe" button depending upon answers to Rick's query.

Your code will overwrite B1 when a new priority number is entered in A1

From OP's description, sounds like B1 date should remain as was and B2 to
get new date.


Gord
 

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