Date Last Modified formula?

Aimee S.

Board Regular
Joined
Sep 28, 2010
Messages
236
Office Version
  1. 365
Platform
  1. Windows
Is there such a thing?

If this involves VBA, pretend I am an idiot and go step by step. I know ALT+F11 gets me to that screen but not much more.

I want cell B2 of my main worksheet to show in mm/dd/yy format the last date when any values throughout the entire workbook were changed.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hello,
Im assuming you want to track when a cell value (or formula) was edited.

try this:

open the vba editor (alt+F11), in the project explorer (the left part of window) select worksheet for on which you want to track change and place following code:


Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Range("A2").Value = Now()
End Sub

then for one sheet you can use =max() with all the ranges
 
Last edited:
Upvote 0
Hi! Thank, but thatt only returns the highest maximum value on the page of data.

I am looking for a code/fomula that gives me the last date *anything* whatsoever was changed throughout the workbook.
 
Upvote 0
That is cool to know. Unfortunately, as we all know, people can save even when there are no changes made (habit) so this could be very misleading if it were to take the place of when actual changes were last made.
 
Upvote 0
Then you need the kind of events that storm8 wrote about.

Probably I would go for a Workbook_SheetSelectionChange event.
 
Upvote 0
Understood, but I don't know enough about those to tinker, and the above solution only gave me the greatest of all data values on the sheet, so I am confused as to why the MAX aspect is in there or why it won't work as I want it to.
 
Upvote 0
Hi! Thank, but thatt only returns the highest maximum value on the page of data.

I am looking for a code/fomula that gives me the last date *anything* whatsoever was changed throughout the workbook.

How about using the Workbook_SheetChange event of the ThisWorkBook object, and storing the date and time of any change in a defined name?
 
Upvote 0
Pick a defined name, any defined name! Can you show me with what it would look like? The full VBA as well as the formula I would type in the worksheet cell? :)
 
Upvote 0
I did mean the Workbook_SheetChange event in my post above, not SelectionChange.

Consider:

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    ThisWorkbook.Names("LastChange").RefersTo = Now
End Sub

First create a named range called LastChange. Then paste this code in "ThisWorkbook" in VBA. Then you're ready to use the value of that named range in a cell in Excel. For instance:

=LastChange

Wigi
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,890
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top