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.
 
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? :)

That's what I did. Please also spend time in investigating the topic, by browsing the internet for instance or reading the help files.
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
With all due respect I did, and this was my last resort. Perhaps I did not know what to google for specifically, or worded it incorrectly. Thank you for your time.
 
Upvote 0
With all due respect I did, and this was my last resort. Perhaps I did not know what to google for specifically, or worded it incorrectly. Thank you for your time.

OK. Does it work now?
 
Upvote 0
No sadly. Just get the error message box:

Run-time error '1004':

Application-defined or object-defined error
 
Upvote 0
Did you create the named range?
What if you use the formula I gave you, but without the VBA code?
 
Upvote 0
I tried deleting the code from VBA and using =LastChange and get #NAME?

Do I have to define the range for every worksheet for a lastchange formula that checks the whole workbook for last modified date? :eeek:
 
Upvote 0
No, you create the named range once. In a cell and sheet of your liking.

After that, you paste the code I delivered earlier.
 
Upvote 0
OK so I selected all cells for a worksheet and named it "ALL"

Then I pasted this into the "ThisWorkbook" VBA window and saved.

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

Then I entered =LastChange in the cell I want the last changed date to appear in that same worksheet and get the same runtime error.
 
Upvote 0
Yes. Also, I chose not to debug at that prompt and went about doing other work in the sheet. as soon as I entered a value in another cell and hit enter the same runtime error came up. So I deleted the code, saved, and now am able to enter data without that coming up.
 
Upvote 0

Forum statistics

Threads
1,225,149
Messages
6,183,194
Members
453,151
Latest member
Lizamaison

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