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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -