Seeing If a Workbook Has Been Saved

Written by Allen Wyatt (last updated January 31, 2026)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365


5

Dave notes that in Word, it's easy to see whether the document you're working on has been saved or not. In Excel, though, that information isn't presented, so he wonders if there is some way to have the program display info in a cell that would indicate whether or not the workbook has been saved.

In the latest versions of Excel, what Dave sees is already in place. The indication of whether a workbook has been saved or not is also consistent with the indication shown in Word. If a workbook has been saved, then at the top of the Excel program window—just to the right of the Quick Access Toolbar and to the left of the Search box—you'll see the name of the workbook. Immediately after saving the workbook, to the right of the workbook name you'll see text similar to "Saved to this PC." (In Microsoft Word, the text is simply "Saved.") Make an edit, and this text goes away until you next do a save.

If this indicator is not prominent enough for you, then you can create some macros that will do what Dave desires. Place the following macro in a standard module for the current workbook:

Private Sub UpdateSaveStatus(ByVal JustSaved As Boolean)
    On Error GoTo SafeExit
    Application.EnableEvents = False

    With ActiveWorkbook.ActiveSheet.Range("A1")
        If ActiveWorkbook.Saved Then
            .Value = "Saved"
        Else
            .Value = "Unsaved!"
        End If
    End With
    If JustSaved Then ActiveWorkbook.Saved = True

SafeExit:
    Application.EnableEvents = True
End Sub

Next, place the following macros in the ThisWorkbook module for the save workbook:

Private Sub Workbook_Open()
    UpdateSaveStatus False
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    UpdateSaveStatus False
End Sub
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
    UpdateSaveStatus True
End Sub

Whenever the workbook is opened, saved, or a change is made, the UpdateSaveStatus macro is executed, which places the appropriate text ("Saved" or "Unsaved!") into cell A1.

The drawback to such an approach, obviously, is that your workbook will need to be saved as an XLSM file (macro enabled). The macro code would also need to be added to every workbook that you want to use this approach.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (5224) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Copying Form Field Contents

Are you developing a form with Word? In some instances it is advantageous to copy whatever is entered in a form field to ...

Discover More

Returning to Where You Were Before Finding Something

When you use the Find and Replace dialog box to do editing, you could easily lose track of where you were before ...

Discover More

Using Optional Hyphens

Adding hyphens to your document can affect the way in which Word wraps text from one line to the next. Optional hyphens, ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Who Has the Workbook Open?

When you are working with workbooks to which multiple people have access, it can be helpful to know who has a particular ...

Discover More

Favorites and Recents Don't Show Up when Starting Excel

When you start Excel, it helpfully offers recent or favorite workbooks you can open. If the display of these workbooks is ...

Discover More

Making Ribbon Customizations Apply to All Workbooks

Excel allows you to easily make changes to the ribbon, as well as to the Quick Access Toolbar, which is near the ribbon. ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 4 + 7?

2026-02-02 19:46:13

Tomek

@J. Woolley:
Yes, Dave asked if there is a way to display the save status in a CELL, but he also mentioned that in Word you can easily see the save status. I am not sure why he observes the difference, may be he uses an older version of Excel or Office.

Asking for the Save Status to be placed in a cell is creating a Catch 22 situation, whatever you place in the selected cell will make the workbook not saved. That is why an User Defined Function shown below will **always** return FALSE if used in a cell:

Public Function isSaved()
    Application.Volatile
    isSaved = ActiveWorkbook.Saved
End Function

It will return FALSE even if you have AutoSave into OneDrive, which is supposed to save all changes on the fly.

You can override the save status, like Allen has proposed, by explicitly changing it back to what it was before the check and placing the status in a cell, but that would make a file that was modified and actually not saved thereafter, reported as saved. Such approach will get what David asked for, but ...

I cannot see the utility of having such information in a cell. Would you depend on such cell in your spreadsheet calculations? If so you would depend on potentially incorrect status, as it may or may not be updated.

My suggestion of the message box with the save status is more dependable, as it does not change the workbook. If you need for a macro to depend on the save status, you can check it within the macro without changing the workbook as well.

The message box will also indicate whether the workbook was actually saved if you use OneDrive. As I mentioned in my comment, there is a delay between modification of the workbook and the OneDrive AutoSave catching up. That delay in my experience can be as long as 2 minutes. In this scenario, although the Title Bar will indicate "Saved" almost immediately after the changes, if you have a power outage or computer crash during this delay, those last changes will probably be lost.


2026-02-01 10:11:45

J. Woolley

@Tomek
Yes, there are several problems. But remember Dave "wonders if there is some way to have the program display info in a CELL that would indicate whether or not the workbook has been saved."


2026-01-31 14:27:15

Tomek

In my opinion all these macro based approaches are like using big guns to kill a mosquito. Additionally, there are several problems, some of them mentioned by Alex Blakenburg and J. Woolley.
The indicator in the Title Bar "Saved" or "Saved to this PC" should be sufficient and not clutter your actual workbook. For earlier versions of Excel that do not show this indicator I suggest a simple macro that should be placed in your PERSONAL.XLSB:

Public Sub infoSaved()
    MsgBox ActiveWorkbook.Saved, , "Is the Workbook Saved?"
End Sub

Assign this macro to you Quick Access Toolbar and click on the icon whenever you need this information.

There is one glitch if you use OneDrive and set the AutoSave option: the Title Bar indicator will show your workbook as "Saved" after you make some change to the workbook (it is AutoSave after all), while the macro above will still tell you "FALSE" at least for a while. But the workbook will get saves when you exit it.

NOTE also the difference in the Title Bar indicator from "Saved to this PC" to just "Saved" if you use One Drive.


2026-01-31 10:48:48

J. Woolley

There are several reasons why the Tip's VBA procedures will not work as described:
1. As noted by Alex Blakenburg, if Sub UpdateSaveStatus is located in a standard module, then it must not be declared Private; otherwise, it will not be available to procedures in the ThisWorkbook module. It might be better to retain UpdateSaveStatus as a Private Sub and locate it in the ThisWorkbook module so it can only be referenced locally.
2. Cell A1 on every worksheet must be reserved for use by UpdateSaveStatus.
3. UpdateSaveStatus updates the value of cell A1 on any worksheet that is currently active but not when that worksheet is inactive; therefore, cell A1 will not reliably indicate the current status when that worksheet is reactivated.
4. When a sheet is calculated the workbook usually becomes unsaved, but cell A1 is not appropriately updated.
5. Workbook_AfterSave calls 'UpdateSaveStatus True' even if Success is False and the workbook is not saved. ActiveWorkbook.Saved is automatically updated by Excel; it is not normally set in VBA unless you want to close an unsaved workbook without a Save prompt.
Here's an alternate method that resolves these issues. First pick a single cell to display the save status and use Formulas > Define Name (Alt+M,M,D) to name that cell SaveStatus with Workbook scope. Then add the following VBA to the ThisWorkbook module:

Private Sub Workbook_AfterSave(ByVal Success As Boolean)
    If Not Success Then UpdateSaveStatus False
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
    Cancel As Boolean)
    UpdateSaveStatus True
End Sub

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
    UpdateSaveStatus False
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
    ByVal Target As Range)
    UpdateSaveStatus False
End Sub

Private Sub UpdateSaveStatus(arg As Boolean)
    Application.EnableEvents = False
    Range("SaveStatus") = IIf(arg, "", "Not ") & "Saved"
    Application.EnableEvents = True
End Sub

Notice any sheet can display the current save status by entering the following formula in a cell: =SaveStatus
This method might not cover all event scenarios. Please describe any issues you observe.
Finally, this method is impractical for reasons described by Alex Blakenburg.


2026-01-31 07:30:44

Alex Blakenburg

If you are going to place the "UpdateSaveStatus" sub in a standard module as indicated, you need to drop the "Private" keyword before "Private Sub UpdateSaveStatus" or you will get "Compile Error : Sub or Function not defined".
Also a more significant draw back than making the workbook an XLSM file is that since you are running an update macro each time you make a change to a sheet, it will clear the Undo Stack for that workbook. So Undo / Ctrl+Z will no longer work.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.