Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. 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: Comparing Workbooks.

Comparing Workbooks

by Allen Wyatt
(last updated May 2, 2016)


Krishna asked if there was a way to compare the contents of two Excel workbooks. Unfortunately, there is no built-in comparison feature, as there is in Word to compare two documents. There are third-party programs available that can help you out, and a quick search of the Web can help to locate such programs.

Depending on your needs, there can be an easier way. If the worksheets in each workbook are laid out the same, and you just want to find differences between values in the cells of each worksheet, then you can use formulas to compare worksheets. Try the following steps:

  1. Create a new workbook called Compare.xlsx.
  2. In cell A1 of the first worksheet in Compare.xlsx, enter the following formula:
  • Copy the formula from A1 into all the other cells that represent the range you want to compare. For instance, if you want to compare A1:G12 in both worksheets, then you would copy the formula from A1 into the full range of A1:G12.
  • These steps assume that the worksheets you want to compare are both named Sheet1, and they are in WB1.xlsx and WB2.xlsx, respectively. If you have other sheets in WB1.xlsx and WB2.xlsx to compare, you can use similar formulas in other sheets of Compare.xlsx.

    When done, any cell that has the word "Different" in it represents a cell that is different in the ranges being compared. Thus, if C7 had "Different" in it, then there is a difference between the cell C7 of Sheet1 in WB1.xlsx and cell C7 of Sheet1 in WB2.xlsx.

    If you are comparing only numeric values between the two worksheets, you could use a different formula in step 2, above:


    The result is a worksheet that subtracts the values in one workbook from the other, which results in the numeric differences.

    ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11211) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Comparing Workbooks.

    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. ...


    Checking for Proper Entry of Array Formulas

    Excel allows you to enter two different types of formulas in a cell: A regular formula or an array formula. If you need ...

    Discover More

    Creating an Executive Summary

    Word includes an "executive summary" tool that allows you to automatically summarize a document. This tool provides a ...

    Discover More

    Specifying an Order for Page Printing

    If a printout of your worksheet requires multiple pages, you may want to specify the order in which Excel prints those ...

    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)

    Opening a Workbook as Read-Only

    When you need to work on a workbook, you may want to do so without modifying the original contents of the workbook. This ...

    Discover More

    Who Has the Workbook Open?

    When you are working with workbooks to which multiple people have access, it can be helpful to know who has a particular ...

    Discover More

    Forcing a Workbook to Close after Inactivity

    Tired of your workbooks being left open on the screen where they can be seen by anyone passing by? Here's a way to have ...

    Discover More

    FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

    View most recent newsletter.


    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 1 + 3?

    2018-07-11 08:44:08


    Good Morning,

    This Tip came just on the right day! I just today had to compare two workbooks and it worked perfectly.

    Thanks for the Tip.

    2016-06-25 11:01:18


    I am having a hard time make this formula work - I am trying to compare text, not just numeric values.
    I have tried to re-write the formula using the appropriate workbook, and worksheet names, and also trying to copy the formula into relative cells, but it doesn't seem to be working...any hints?

    2015-09-24 10:10:30


    To Michael, I would slightly reformulate it as:

    = IF( '[WB1.xlsx]Sheet1'!A1 = '[WB2.xlsx]Sheet1'!A1,
    "", "R" & ROW() & " C" & COLUMN() &
    "S1= " & [WB1.xlsx]Sheet1!A1 &
    "S2= " & [WB2.xlsx]Sheet1!A1 &
    IF( AND( ISNUMBER([WB1.xlsx]Sheet1!A1), ISNUMBER([WB2.xlsx]Sheet1!A1) ),
    " (∆= " & [WB1.xlsx]Sheet1!A1 - [WB2.xlsx]Sheet1!A1 & ")", "" ) )

    To Thiago:
    For example, on cell A1 of your worksheet, go to Conditional Formatting > New rule > Use a formula (...), type in:
    = NOT( A1 = '[WB2.xslx]Sheet1'!A1 )
    and choose a format.
    Then extend this conditional format to all cells of interest via Conditional Formatting > Manage rules.

    2015-09-04 00:03:37


    It's amazing the help you all provided.

    Would that be possible to have a formula where doing the comparison instead of showing True or Different etc it would show what has been changed?

    Let's say Cell A3 was Bathroom and someone changed to Bedroom

    Would be possible to have a formula showing what has been changed and what for?

    How about a hidden formula on the original document that could be sent to the client and if he/she makes any changes it would simply create a copy of the actual spreadsheet as Sheet 2 for example with the changes in RED?

    Would you believe it would be possible?

    Thank you so much

    2015-01-08 13:06:28


    Thank you Michael and Glenn! I've never used the symbols in formulas, but it certainly adds flair to the result.

    2015-01-08 08:38:33

    Glenn Case


    To insert symbols such as ∆, go to the Insert Tab and select Symbol from the Symbols tab. The available symbols will change depending on which font set you have selected.

    2015-01-07 05:37:40


    Peter, just copy it to the clipboard from the character map application

    2015-01-06 16:09:12


    ... or, to meet Michael's goals below with a simplified formula, just replace "Different" in Allen's formula with:


    to get a non-cluttered worksheet with only the pertinent information. You can use FIND to find the <> if you have a large spreadsheet.

    2015-01-06 12:18:45


    How do you get the Delta symbol into your formula?

    2015-01-06 10:54:19


    If comparing two spreadsheets, knowing the difference would only be the 1st step. Then you would probably need to know the values in both.

    To prevent having to toggle back and forth between the two sheets, we could modify the formula to something like (with embedded carriage returns, word-wrap turned on, and row height set to 45 to accommodate 3 rows per cell):

    "R "&ROW()&" C "&COLUMN()&"
    1= "&[WB1.xlsx]Sheet1!A1&"
    2= "&[WB2.xlsx]Sheet1!A1&" (∆= "&[WB1.xlsx]Sheet1!A1-[WB2.xlsx]Sheet1!A1&")",
    "R "&ROW()&" C "&COLUMN()&"
    1= "&[WB1.xlsx]Sheet1!A1&"
    2= "&[WB2.xlsx]Sheet1!A1))

    For non-numeric fields, it would yield a result of:

    R 3 C 1
    1= A22334
    2= B22334

    For numeric fields, it would yield a result of:

    R 4 C 3
    1= 3.1
    2= 3.3 (∆= -0.2)

    2015-01-06 07:45:53


    @Gary, sorry I should have finished reading your email, I do see that you added another step to hi-light the False results, still an added step however.

    2015-01-06 07:43:38


    @Gary, your formula certainly would work too, but wouldn't you end up having to sort thru a sheet full of True & False, rather than just seeing the word different here and there?

    2012-02-11 09:37:23

    Gary Schirmer

    An easier formula would be:

    This results in TRUE or FALSE based on values being equal or not. Then use conditional formatting to highlight the FALSE results... Also easily created using point and click, you just have to change the Absolute to Relative before copying cells in the COMPARE workbook...

    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

    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.