Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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: Opening Two Workbooks with the Same Name.

Opening Two Workbooks with the Same Name

Written by Allen Wyatt (last updated September 6, 2021)
This tip applies to Excel 2007, 2010, 2013, and 2016


11

It is not unusual to have two workbooks, located in different folders that have the same name. For instance, you could have two folders, one named "Year 2015" and another named "Year 2016." Both folders could contain a workbook file named Budget.xls.

Opening one of the Budget files in Excel is easy. If you try to open the second Budget file while the first is already open, Excel will generate an error. It does this because many of the internal functions used by Excel don't rely on a full path name for their operation, but instead look at only the name of the workbook. Having two workbooks open with the same name would cause these internal functions to become confused. The solution—don't let Excel open the second file that has the same name.

There are a couple of ways around this, however. The first (and obvious) workaround is to rename one or both of the workbook files. In the example above, you could name one file Budget2015.xls and the other Budget2016.xls. With different names, the workbooks will open just fine.

The second workaround is to just open a second instance of Excel. In other words, when you want to open the second Budget file, don't do it by choosing Open from within the program. Instead, use the Windows Start menu to start another copy of Excel. Because of the way that memory and programs are handled by Windows, neither copy of Excel is aware of the other. Thus, you could open the different Budget files (each with the same name) in each of the instances of Excel.

There is one potential glitch if you open a second instance of Excel. If there are workbooks that are automatically opened when Excel starts (such as Personal.xls), then you may see a warning or error message when you start the second instance of Excel. In most cases this won't cause any problem—at least it doesn't with Personal.xls. If you have other workbooks that are automatically opened, you will need to do some testing to see if there are any problems evident. (Potential problems can vary, depending on the content and programming inherent in the workbooks being automatically opened.)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11926) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Opening Two Workbooks with the Same Name.

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

Adding Tabs at the Beginning of a Line

Press a tab at the beginning of a paragraph, and Word normally assumes you want to indent the paragraph. If you don't ...

Discover More

Using Seek In a Macro

When processing non-document text files in a macro, you have a wide range of commands available for your use. One of ...

Discover More

Jumping Back to the TOC

Word allows you to create a table of contents that provides hyperlinks to headings within your document. It doesn't make ...

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)

Opening a Workbook to a Specific Worksheet

When you open a workbook, Excel displays the worksheet that was visible when the workbook was last saved. You may want, ...

Discover More

Shrinking Workbook Size

As you work with a workbook over time, it is possible for the workbook to grow to a huge size. If you want to shrink the ...

Discover More

Creating Default Formatting for Workbooks and Worksheets

Not satisfied with the way that default workbooks and worksheets look in Excel? You can easily create your own defaults ...

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 8 + 8?

2022-11-27 15:02:13

Tomek

Still it is best to rename one of the files and save yourself from confusion and any problems with PERSONAL.xlsb


2022-11-27 14:58:58

Tomek

In the past it was easier to open two instances of Excel, sometimes selecting multiple Excel files in File Explorer would open them in more than one instance of excel, which caused other problems. Newest version of Excel (MS365) generally opens all files in the same instance, and opening additional files directly from File Explorer causes them to be in the same instance.

The way around it is to run Excel /x command (J. Woolley's suggestion), start a new instance of Excel following instructions from A DuPreez, or run Excel as administrator as Marc suggested.


2022-11-26 05:01:52

Willy Vanhaelen

You can avoid the Personal.xls error by making it a custom add-in. See: https://excelribbon.tips.net/T008529_Using_Custom_Add-Ins


2021-09-08 11:23:04

Mark

If I use the Windows Start menu to open Excel by typing exc, then enter I still get the same error about another file of the same name. I have to right click on Excel in the Start menu and run as administrator for it to work!


2021-09-07 11:07:00

A DuPreez

One can also open the same workbook with 2 instances of Excel. One would be read-only but allows you to make changes separate from the other opened version. (right-click the Excel icon on Taskbar, then click Excel while holding ALT-X)


2021-09-06 11:35:37

Mandora

While it may be technically possible to have two Excel files with the same name open at the same time, it seems an unwise practice to have identically named files. Standard practice should be distinct file names, eg: xyz_2020, xyz_2021 or xyz_JAN21, xyz_FEB21, etc. There is no work around and no confusion about which file you are working in or referring to.


2021-09-06 04:32:04

Philip

Note for the Mac users : only one instance of Excel can be open … so renaming the file is the way to go …


2020-09-21 08:22:21

Nick DeMarco

Thanks for the two alternatives. I can see you spent some time thinking about this, which likely means there's no easy workaround. I've forwarded these to the individual with the problem, as I don't know what I'm doing with VB (or command lines for that matter). Your efforts are truly appreciated!


2020-09-19 12:46:34

J. Woolley

@Nick DeMarco
You can also use Excel's /x command line switch to open a new instance:
excel.exe /x "c:\my folder\book1.xlsx"


2020-09-19 10:55:19

J. Woolley

@Nick DeMarco
This VBScript named OpenExcelFile.vbs will open each file in a different instance of Excel.

' Open an Excel file: OpenExcelFile.vbs CompleteFilepath
' Sep 2020 by J. Woolley, https://sites.google.com/view/MyExcelToolbox/
Set oArgs = WScript.Arguments
If oArgs.Count = 0 Then WScript.Quit
Const xlMinimized = -4140
Const xlNormal = -4143
With WScript.CreateObject("Excel.Application")
.WindowState = xlMinimized
.Visible = True
.Workbooks.Open(oArgs(0))
.WindowState = xlNormal
End With

The default app for filetype vbs is normally wsh.exe (Windows Script Host).
Make a shortcut to each Excel file that has a duplicate name, then edit the shortcut's Target property to add the full path of OpenExcelFile.vbs before the Excel file's path (separated by a space character). Use quotation marks when necessary.


2020-09-18 12:27:27

Nick DeMarco

Hi, Allen! Nick DeMarco from Philadelphia Gas Works - we've exchanged emails a few times over the years.

Here's the hiccup - we're running O365 (Excel 365) on Windows 10 (new to us). Disregarding your suggestion about renaming one of the files, I had told my colleague the same thing you wrote - open a new instance of Excel and open the file with the same name in that. However, for whatever reason (Win 10, Excel settings, the phase of the moon), when we go to open the same named file from a different location in the new window, with the other file already open in the first window, Excel errors anyway ("Cannot open two files with the same name..."), on top of the Book 1 of the new window.

Is there a more effective way to open the "new" Excel window from the old one? (i.e., "cordon off" the Excel windows from each other?) I checked Excel's options to see if there was a toggle that forced newly opened Excel workbooks into "new" windows, which I remembered seeing in older versions, but now I don't see it. Every other way I've tried to "open" a separate and distinct Excel workbook window seems to work, but the above error persists. Advice?

Nick DeMarco


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.