Home » excel » Trying to compare two Excel reports for heading changes

Trying to compare two Excel reports for heading changes

Posted by: admin May 14, 2020 Leave a comment

Questions:

I work with Excel 2010 and need to compare the report column headings in the previous report to the latest report to identify changes in the report layout (there are 100+ columns and and report changes occur periodically).

Right now I paste the new report immediately below the old report with its associated data and then hide the data in the old report so that I can see just the column headings in both the old and new reports and then do a manual eyeball compare of the two rows of heading data to make sure they have not changed.

Is there an easier way to do it?

Thanks for your help.

How to&Answers:

You can use an ARRAY FORMULA to compare two ranges.

=AND(Sheet1!A1:ZZ1=Sheet2!A1:ZZ1)

and hold down ctrl-shift as you hit “enter”. If all cells in the two ranges are the same, it will return “TRUE” – otherwise it will return “FALSE”. (Simplified – thanks to @pnuts!)

If you want to know WHAT cells are not matching, you could use conditional formatting: select all the cells in the header row that you want to check, then

  1. Click “conditional formatting”–>New Rule–>”Use a formula to determine which cells to format”
  2. In the formula box, type =Sheet1!A1 <> Sheet2!A1 (note – if you click on cells to select them, Excel will add $ signs. YOU MUST REMOVE THOSE or this will not work properly for all but the first cell in the header)
  3. Select formatting you want for “non-matching” cells (e.g. Format–>Fill “red background”)
  4. Click on various “OK” buttons to dismiss the dialogs

Now all the mismatched headings will be red – easy to see, no need for careful cell-by-cell comparison.