Row Data Compare

blueolive

New Member
Joined
Aug 5, 2019
Messages
4
Hello Friends,
I want to compare two subsequent rows and highlight all the differences.

Example - Treat source A row as the correct data. If source B row data mismatches source A row, highlight it automatically as shown. There are about 60 values to compare (62 columns) and about 20,000 rows in the excel.

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]employee_id[/TD]
[TD]salary[/TD]
[TD]department[/TD]
[/TR]
[TR]
[TD]source A[/TD]
[TD]100[/TD]
[TD]300[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]source B
[/TD]
[TD]100
[/TD]
[TD]350[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]source A[/TD]
[TD]230[/TD]
[TD]400[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]source B[/TD]
[TD]230[/TD]
[TD]400
[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]source A[/TD]
[TD]500[/TD]
[TD]550[/TD]
[TD]T[/TD]
[/TR]
[TR]
[TD]source B[/TD]
[TD]500[/TD]
[TD]590[/TD]
[TD]T[/TD]
[/TR]
[TR]
[TD]source A[/TD]
[TD]400[/TD]
[TD]490[/TD]
[TD]W[/TD]
[/TR]
[TR]
[TD]source B[/TD]
[TD]400[/TD]
[TD]460
[/TD]
[TD]E[/TD]
[/TR]
</tbody>[/TABLE]


I'm using MS Office 2016.

Thank you!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
You can do that with Conditional Formatting.

Assuming that data starts at the top left of the sheet per my screen shot below ..
1. Select from C2 to the bottom of your data
2. Home ribbon tab -> Conditional Formatting -> New Rule .. -> Use a formula to determine which cells to format -> Format values where this formula is true: =AND($A2="source B",C2<>C1) -> Format... -> Font tab -> Choose font color -> OK -> OK

Excel Workbook
ABCD
1employee_idsalarydepartment
2source A100300A
3source B100350A
4source A230400D
5source B230400E
6source A500550T
7source B500590T
8source A400490W
9source B400460E
10
Compare
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C21. / Formula is =AND($A2="source B",C2<>C1)Abc
 
Upvote 0
Thank you Peter for a quick response. I appreciate it! (sorry for a double post but I couldn't see my first post on my dashboard, whereas I could see my second post)
The solution you suggested works. My only gripe is I have 60 columns to compare so I would have to apply this conditional formatting 60 times. Any easy way to automate it?

Thank you!
 
Upvote 0
My only gripe is I have 60 columns to compare so I would have to apply this conditional formatting 60 times. Any easy way to automate it?
I didn't make it clear enough in my earlier post. If you select from C2 to the bottom right of your data (that is, all 60 columns that need to be checked), then you just apply the CF formula as shown and Excel will adjust for all the other columns automatically. :biggrin:
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,153
Members
452,615
Latest member
bogeys2birdies

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