Compare 2 books, highlight differences in multiple colors based on criteria

WhiteRaven76

New Member
Joined
Jun 27, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I am trying to make a VBA that compares a row from Book1 to Book2.
If there are any differences it will:
  1. Create a new sheet in Book1
  2. Copy the row from Book2
  3. Copy the row from Book1 and highlight it yellow
  4. Skip a line (so each difference is separate from the others)
The Address and Seq. will be mostly static. The caveat is there will be times when a new address will be added in, which will create a difference between both books for every address below that. So I want to make sure it is comparing the data from Column A in Book1 to the data in Column A in Book1 without comparing the row it is in. So, if Address 59 is on Row 59 and then a new address gets added before it, the updated Book will now show Address 59 is on Row 60. I am hoping to find a way to have it look for the same address in each book and then check if anything is different and, if there is a difference, copy the rows from both books into a new sheet in Book1.

This is a sample of what the sheets will look like. Each sheet will have between 500 and 1500 rows. If anyone has any advice, I would be greatly appreciative!


AddressSeq.StatusUsageType
Address 11Status 1Usage 1Type 1
Address 22Status 1Usage 2Type 4
Address 33Status 1Usage 1Type 3
Address 44Status 2Usage 1Type 2
Address 55Status 1Usage 2Type 1
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,213,497
Messages
6,114,002
Members
448,543
Latest member
MartinLarkin

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