xlCompare: How to merge data from two worksheets

Need to syncronize data from two worksheets, or combine data from different sources? xlCompare does this work in a seconds. All you need is to open workbooks you want to merge and select Merge command:
xlCompare commands
When you select Merge command, xlCompare does the following:
  • Find equal rows and columns on both worksheets
  • Update existing records - cells in the equal rows and columns
  • All columns which are not present in the left worksheet are added
  • All missed records are moved from the right worksheet to the left one
  • Update cells are marked with color
  • New records are also marked with color
You don't get comparison results in this case. This command does all work itself and gives you result of merge operation on the left sheet.
So, data from the right book(worksheet) is merged into the data in the left book(worksheet).
On image below you can see typical results on the merge command:
  • Button Compare was changes to Merge
  • Updated records are highlighted with color
xlCompare commands

See Also: