Primary Keys is an important part of the comparison process.
What is Primary Key? This is a value(set of values) which identifies row or column in the workbook. If workbook contains
database records Primary Key identifies record. If workbook has table like Cash Flow statement, Key identifes row in this table.
It is highly important to select Primary Key properly to get accurate comparison results.
How to setup Primary Key in xlCompare:
When your workbook is loaded xlCompare ties to find primary keys using it's own algoritms. You can see result of this process on the
every worksheet. Primary Key is highlighted with green color and Key icon:
If key found by xlCompare should be changed - you can do this in the following ways:
Select column/row (you can select several columns or rows if you have complex key), and apply Right Click Menu | Set As Primary Key command:
Right Click Menu | Clear Primary Keys command removes all primary keys from this worksheet.
Right Click Menu | Manage Primary Keys ... command and Tools | Manage Primary Key ribbon command open dialog
where you can edit Primary Keys for all workbooks you've opened.
Using Arrow buttons you can add\delete fields or change priority of the field by moving it up or down.
xlCompare remembers your selection. When you open workbook next time - it loads primary keys you've selected.
We've created special section relative to Primary Keys on our website: Working with Primary Keys
It explains all operations you can do with Primary Key - clear keys, add or remove keys, ...