Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. 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: Grabbing the MRU List.
Written by Allen Wyatt (last updated September 25, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
Excel allows you to maintain a list of the most-recently used (MRU) files. This list can record the names of up to the last nine workbooks opened and edited within Excel. Understand that nine workbooks is the default; the user can actually change the number of workbooks that can be maintained in the list. See the tip MRU Files Won't Display for more information.
If you want to grab the names of the MRU files and insert those names in a worksheet, you can use the following macro:
Sub MostRecent() Dim J As Integer For J = 1 To Application.RecentFiles.Count Cells(J, 1) = Application.RecentFiles(J).Name Next J End Sub
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9783) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Grabbing the MRU List.
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!
Need to know what the full path name is for the current workbook? With a simple macro you can display the full path name ...
Discover MoreSometimes, when importing data created by other programs, you may find that there is too much for Excel to handle. Here's ...
Discover MoreWhen you open a workbook in Excel, the Open dialog box always starts within the folder in which you were last working. ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-09-25 10:33:31
J. Woolley
My Excel Toolbox includes the ListRecentFiles([AddPath]) dynamic array function. In older versions of Excel you can use it with the SpillArray function like this:
=SpillArray(ListRecentFiles([AddPath]))
See https://sites.google.com/view/MyExcelToolbox/
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments