Date Reference a cell

  • Thread starter Thread starter Blaine
  • Start date Start date
B

Blaine

I need to create a spreadsheet that can track when the
last time a series of cells were modified. I have looked
through the Functions, but nothing will give me what I
need.
Basically, if Cell A1 was last used March 1, 2003, and you
change the value today, I need to show in cell B1, A1 was
modified today.
Any ideas?
 
You can do it with the change event of the worksheet
This example will place the date/time in the B column if you change
a cell in the range A1:A20.

Place the code in the Sheet module

Right click on a sheet tab and choose view code
Paste the code there
Alt-Q to go back to Excel


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("a1:a20"), Target) Is Nothing Then
Target.Offset(0, 1).Value = Format(Now, "mm-dd-yy hh:mm:ss")
End If
End Sub
 
Back
Top