If other people can edit your workbook, you might open it and wonder "Who changed this? And what did they do?" Microsoft Spreadsheet Compare can answer these questions by finding these changes and highlighting them for you.
Important: Spreadsheet Compare is available only in Excel for Windows in Microsoft 365 Apps for enterprise plans and equivalent editions Microsoft 365 Apps for enterprise and equivalent editions.Â
-
On the Ribbon, select the Inquire > Compare Files. If you don't see the Inquire tab in the Excel ribbon in Excel for Windows, see Turn on the spreadsheet Inquire add-in.
-
In the Compare Files dialog box, choose the files you'd like to compare. Â
Note:Â You can compare two files with the same name if they're saved in different folders.
-
Choose OK to run the comparison.
Note: If you get an "Unable to open workbook" message, this might mean a workbook is password protected. Select OK and then enter the password. Learn more about how passwords and Spreadsheet Compare work together.
The results of the comparison appear in a two-pane grid. The workbook on the left corresponds to the "Compare" file you chose and the workbook on the right corresponds to the "To" file. Details appear in a pane below the two grids. Changes are highlighted by color, depending on the kind of change.
Understanding the results
-
In the side-by-side grid, a worksheet for each file is compared to the worksheet in the other file, beginning with the leftmost worksheet in each. If a worksheet is hidden in a workbook, it's still shown and compared in Spreadsheet Compare.
-
If the cells are too narrow to show the cell contents, select Resize Cells to Fit.
-
Differences are highlighted with a cell fill color or text font color, depending on the type of difference. For example, cells with "entered values" (non-formula cells) are formatted with a green fill color in the side-by-side grid, and with a green font in the pane results list. The lower-left pane is a legend that shows what the colors mean.
Other ways to work with the comparison results
If you want to save your results or analyze them elsewhere, you can export them to an Excel file or copy and paste them into in another program, such as Microsoft Word. There's also an option for getting a high-fidelity look at each worksheet that shows the cell formatting, close to what you'd see it in Excel.
-
You can export the results to an easier to read Excel file. Select Home > Export Results and save the new file.
-
Select Home > Copy Results to Clipboard to copy and paste the results to another program.
-
To show cell formatting from the workbook, select Home > Show Workbook Colors.
Other reasons to compare workbooks
-
Say your organization is due to be audited. You need a trail for your critical workbooks that shows the changes month over month or year over year. This trail can help you find and correct mistakes before the auditors find them.
-
In addition to comparing contents of worksheets, you can use Spreadsheet Compare to check for differences in VBA (Visual Basic for Applications) code. The results are returned in a window in which you can see the differences side by side.