Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Noting When a Workbook was Changed.
by Allen Wyatt
(last updated August 31, 2017)
In an environment where multiple people work on the same workbook, you may want a way to keep track of when people last changed a workbook. There are a couple of ways you can approach this task. One is to simply figure out when a workbook was last saved. This approach works well if you assume that any changes to the workbook are always saved. (Unsaved changes, of course, are not really a lasting change at all.) The following macro returns the date that a workbook was saved and stores that date in cell A1:
Sub DateLastModified() Dim fs, f Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("D:\MyFolder\MyFile.xlsx") Cells(1, 1) = f.DateLastModified End Sub
To use the macro, just replace the D:\MyFolder\MyFile.xlsx file specification with whatever is appropriate for you.
If you want a history sheet of who did what with your workbook, then a different approach is necessary. Perhaps the best solution is to try Excel's sharing feature, which can be configured to keep a history log for a workbook. Follow these steps:
Figure 1. The Editing tab of the Share Workbook dialog box.
Figure 2. The Advanced tab of the Share Workbook dialog box.
As changes are made to the workbook, Excel tracks those changes (along with who made them) and puts them in a separate worksheet so you can review them later.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7924) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Noting When a Workbook was Changed.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Ever want to see a list of all the workbooks that are open? If you open more than nine, Excel only displays the first ...Discover More
Want a quick way to access the workbooks you use most often? You can "pin" the workbooks so they can be opened with a click.Discover More
Have you ever tried to save a workbook, only to be notified that someone else has made changes in it? What if you are the ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.