Date change afetr update

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:24 PM GMT

QuestionEdit

I need to keep track of the latest data on a shared spreadsheet, so I'm looking for a formula or vba that will add the current date when data in the row is updated.

I have information from B to U down and would like the date to be populated in the cells in column V.

Any ideas? Doers such a function exist?

Kind Stuart

AnswerEdit

First of all, I strongly advise against using the share workbook feature of Excel, it is burdened with bugs. You risk loss of data and possibly corruption of the file.

For recording the date, you could use a worksheet_Change event.

- rightclick the sheet's tab, select "View code" and insert this code:

Dim mbDisableEvent As Boolean

Private Sub Worksheet_Change(ByVal Target As Range)

   If mbDisableEvent Then Exit Sub
   If Intersect(Target, Range("B:U")) Is Nothing Then Exit Sub
   mbDisableEvent = True
   Intersect(Target.EntireRow, Range("V:V")).Value = Date
   mbDisableEvent = False

End Sub

Advertisement

©2024 eLuminary LLC. All rights reserved.