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

by Allen Wyatt
(last updated September 6, 2021)

8

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

Using the WEEKNUM Function

Need to know which week of the year a particular date falls within? Excel provides the WEEKNUM function so you can easily ...

Discover More

Formatting an ASCII Table with Tabs

If you get a document from a coworker that has tabs used to line up tabular information, you might want to change that ...

Discover More

Getting the Expected Space Before a Heading

If your heading styles are designed to add extra space before the heading, you may be surprised when that extra space is ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Seeing All Open Workbook Names

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

Opening Two Workbooks at Once

Do you work with a group of workbooks all the time in Excel? Windows and Excel both provide a plethora of ways you can ...

Discover More

Making Data Universally Accessible to Workbooks

If you are using Excel as a repository for data used in your business, you may want to figure out a way to make that ...

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

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.