Compare 2 Workbooks Generate Report Tab of Variances Found in 2nd Workbook

ChrisOK

Well-known Member
Joined
Mar 26, 2003
Messages
601
Found several posts abt this topic but none that do what I need and some caused never-ending loops.. =-(
Ideally (if possible) I need it to be somewhat customizable -- to-- in some cases only compare 2 workbooks with 1 identical sheetname in each..
but will sometimes need to be able to compare 2 workbooks that hold 5 identical named tabs in each --similar to the example below:

Hoping the code might be easy-enough to simply place a comment mark in front of extra Sheets not needing compared when that 'turn off' is needed.
Like the example below, the code is written to handle 5 sheets, but if there's an event where only sheet1 and sheet2 are needed, the others get commented out to temporarily turn them off..

Example:
Workbook1 - Sheet1 called "AAParts" will be compared against Workbook2 - Sheet1 called the identical name "AAParts"
'Workbook1 - Sheet2 called "BBParts" will be compared against Workbook2 - Sheet1 called the identical name "BBParts"
'Workbook1 - Sheet3 called "CCParts" will be compared against Workbook2 - Sheet1 called the identical name "CCParts"'
'Workbook1 - Sheet4 called "DDParts" will be compared against Workbook2 - Sheet1 called the identical name "DDParts"
'Workbook1 - Sheet5 called "EEParts" will be compared against Workbook2 - Sheet1 called the identical name "EEParts"

Differences/variances found where a change was made in Workbook2 should appear on a new tab of WB2 w/ something like:
REPORT
(Where change took place in WB2)..... (Was This in WB1 the original master file)..... (Changed to This in WB2)....
......WB2 Sh1 (Cell Refc) A5 ..................................Wing5495...................................Blade6500..........
......WB2 Sh1 (Cell Refc) C5 ..................................Part1234....................................Part9876..........
......WB2 Sh1 (Cell Refc) W5 .................................ValCode1....................................ValCode7..........
......WB2 Sh2 (Cell Refc) W5 .................................ValCode5....................................ValCode3..........

(the new sheet created to hold the reported findings of variances between the 2 can be called anything)
(and if comparing more than 1 sheet is occurring, all findings can be placed on a single new sheet called anything like the below)

(Where change took place in WB2)..... (Was This in WB1 the original master file)..... (Changed to This in WB2)....
......WB2 Sh1 (w/ cell refc) A5 ..................................Wing5495...................................Blade6500..........
......WB2 Sh1 (w/ cell refc) C5 ..................................Part1234....................................Part9876..........
......WB2 Sh2 (w/ cell refc) S5 ..................................ValCode2....................................ValCode7..........
......WB2 Sh4 (w/ cell refc) V5 ..................................ValCode5....................................ValCode3..........
......WB2 Sh5 (w/ cell refc) W5 .................................ValCode1....................................ValCode2..........

If turning off sheets that don't need to be compared is too complex --- I'm happy with simply running it over and over and changing the sheet name refs if it's easier just writing the code to compare WB1 Sheet1 to WB2 Sheet1.
(if there are 5 sheets, I can change the names and re-run it 5 times to get 5 reports if necessary)

*After thought, if possible, a 4th column in the Reported Findings indicating "who" made the change (similar to how tracking performs) where it either gives a person's name or initials or computer id. THIS WOULD TOTALLY BLOW THIS OUT OF THE PARK IF POSSIBLE - but if not, the 3 columns is still awesome!

Thank you!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,326
Messages
6,124,268
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top