Tracking lastest date of change in a row?
Here is some code for you to try. I needs to go into the sheet so right click
the tab and select View Code. Paste the following...
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
If Target.Count = 1 Then Cells(Target.Row, "AB").Value = Date
ErrorHandler:
Application.EnableEvents = True
End Sub
As for the Today, Week, Month you can do that with a formula that references
the date in column AB. You could also add conditional formatting to highlight
problem areas.
--
HTH...
Jim Thomlinson
"Nozza" wrote:
I am happy enough writing macros but want some help to ensure I can
write the one I want!
I have a spreadsheet with pupil details in columns A-C, and then
currently in columns D-AA I hold marking details for student progress.
What I want to be able to do is each time a student's marks change, I
want to place the date in a helper column for the date of the most
recent change to the row. And what I really want is it to display
(maybe in another column) "Today" if it has changed today, "Week" if
it has changed in the last week, and "Month" if it has changed in the
last month. If over a month, then "Warning" needs to be displayed.
Any help gratefully received.
Noz
(Apologies for the earlier post in a different thread!)
|