Update Date

J

Jason

I have sheet of items i have and need to track the invnetory.
when i update a cell, we will say G7. i wanting to have G2 to give me the
date it was updated. if anyone knows a good way to get this done that would
be great.
thanks
 
S

Shane Devenshire

Hi,

This will probably require code so we need to know details - is the only
cell you are concerned with G7 and do you want to put the date always in G2.
What constitutes an update? Entering new data, editing old data, clearing
the cell, formatting the cell?

Here is some sample code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("G7"))
If Not isect Is Nothing Then
[G2] = Date
End If
End Sub

1. To add this code to your file, press Alt+F11,
2. In the VBAProject window, top left side, find your sheet name under your
file name and double click it.
3. Paste in or type the code above.
 

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