Saturday 3 October 2009

Excel Worksheet Diff Tool

As part of my day job, I sometimes have to test the output from reporting systems is as expected.

To speed up this process, I wrote this simple tool to compare the data in two Excel worksheets and highlight the differences. Now VBA is definitely not my first programming language and this was a very quick and dirty job so don't expect bells and whistles, but it seems to work ok.


To use it, just paste the two sets of data you want to compare in sheets 1 & 2 respectively, then click on the Compare menu item (under Add-Ins in Excel 2007) and select Run. Macros will need to be enabled for it to work.

The tool expects the data in both worksheets to be in the same column order (hidden columns are ignored), though row order isn't important and the first column is used to match records between the two datasets (i.e. this column should contain your primary key field). Duplicate row entries are not handled as yet.

No comments:

Post a Comment