updated cell with current time\date if any data in a row has chan

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking for a formula that will put the time & date into a cell anytime
data in a row is changed.
 
This Event macro uses A1 to record time changes for row 1:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim s As String
s = "A2:IV1"
If Intersect(Target, Range(s)) Is Nothing Then Exit Sub
Range("A1").Value = Now
End Sub
 
thanks. Unfortunatly I do not know much about macros I follwed the help
instructions & nothing is appearing in colum A. The first 4 rows of the seeh
are header rows. rows 5 to 505 are data rows.

help PMJ
 
As coded it only operates on the first row

Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm
 

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

Back
Top