Monday, January 05, 2015

Conditional formatting when comparing cells in Excel

I'm sure there are easier ways than this but I wanted to get a visual of the differences between two tables after conversion.
Description
Table A was an Access 97 table that had been converted to SQL 2008 by our vendor. This was not a straight up conversion but rather some massaging of the data had to occur so we needed to find out the differences.
Table B of course was created in SQL.
I exported both tables to Excel and rather than putting them in separate sheets, I pasted them both on the same one (personal preference for this task).
Solution
Select column A.
Select Conditional Formatting | Highlight Cells Rules | More Rules.
On the lower portion of the dialogue, change "Greater than to" the operator you're looking for. In my case I wanted to highlight cells that were different so I chose "Not equal to".
In the formula box, I clicked the picker and clicked on the first cell of the compare to column (column DA) and came back to the dialogue.
The formula now looks like "=$DA$1".
Remove the fixed row indicator so that you get "=$DA1".
Set the formatting and click OK.