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: Use Filenames That Sort Properly.

Use Filenames that Sort Properly

by Allen Wyatt
(last updated May 31, 2016)

1

It is not uncommon to work on projects that require several workbooks. When you are naming files for your project, you should use names which will later sort properly when you use various functions of Excel. For instance, the Open dialog box shows the files in the current directory. If your files are named properly, they will always appear in order on the list.

I ensure this by starting all files related to a project with a number of digits that represent the order in which the workbook appears in the project. For instance, if the project entails workbooks from the last quarter of 2012 and the first quarter of 2013, then the files may be named as follows:

201210 Actual Figures.xlsx
201211 Actual Figures.xlsx
201212 Actual Figures.xlsx
201301 Actual Figures.xlsx
201302 Actual Figures.xlsx
201303 Actual Figures.xlsx

The files sort properly because they beginning with the year. If they began with the month, then the first quarter of 2013 would sort before the last quarter of 2012, which is not nearly as helpful an order.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12553) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Use Filenames That Sort Properly.

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

Using the Highlighter

Need to draw attention to some text? Consider using the Highlight tool, which functions just like the highlighter pens you ...

Discover More

Ensuring Standard Units During Data Entry

Need to make sure that information entered in a worksheet is always in a given unit of measurement? It's not as easy of a ...

Discover More

Printing Only Non-Blank Worksheets

If you have a workbook containing many worksheets, you might want to print only those worksheets that have some sort of ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Importing Many Files Into Excel

Importing a single file is easy. Importing a whole slew of files can be much more of a challenge.

Discover More

File Formats that Include Field Formats

If you import data into Excel that is created by other programs, you know that it can be bothersome to get your data ...

Discover More

Getting Input from a Text File

You can use a macro to read information from a text file. The steps are easy, and then you can use that information in any ...

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}] 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 3 + 8?

2016-05-31 11:12:22

Dave Bonin

I do a lot of reporting, which leads me to generate a lot of monthly folders for different subjects.

To force a simple collating order, my folders are often named in the sequence:
2015-11 November
2015-12 December
2016-01 January
...

This has the dual advantage of sorting in date order and showing the name of the month for my reading convenience.
_____

On a similar note, I often name report files somewhat similarly, eg: "Productivity for 2016-04 Dated 05-09.xlsb". This helps clearly define the time period the report is from (it's for the month of April) and when it was last published (May 9th).

The publishing date comes in handy when posting revisions, and to preserve when the report was from in case you accidentally re-save the report when viewing it at a later date.

My two cents.


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.