excel - I want to enter todays date in cell Z2 if any cell between A2 and Y2 are altered -
this recording date of alteration record in spreadsheet containing many thousand records. appreciate suggestions may have; can think of no way formula, if possible, prefer on macro.
thank you.
although specify row 2 in question, mention thousands of rows, assume want macro work rows, not row 2. following add date stamp column z in row change occurred. works if multiple cells changed @ same time, example paste or delete operation.
option explicit private sub worksheet_change(byval target range) dim cel range if not intersect(target, [a:y]) nothing on error resume next application.enableevents = false each cel in target range("z" & cel.row).value = date next cel application.enableevents = true end if end sub
to install, right-click sheet tab, click view code , paste above code window.
Comments
Post a Comment