Match 5 columns values in row exactly within range

jarhead58

Active Member
Joined
Sep 21, 2017
Messages
364
Office Version
  1. 2021
Platform
  1. Windows
I'm trying to compare B2:G2 values to see if there is an exact match in other rows. If so, highlight it and matching row. This is just a sample table but I have at least 1000 other rows. TIA

testrun.xlsm
BCDEFG
234345616514
3102427355318
46133839536
5273234435213
64233761677
7175456636920
811143147484
9346485310
1028314041464
1181218445118
1225758606526
13515457606911
14451743525
1571518324520
16131517456313
17141637485818
18233233454914
192640425524
2034345616514
Sheet1
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Try:

Book2
ABCDEFG
1
234345616514
3102427355318
46133839536
5273234435213
64233761677
7175456636920
811143147484
9346485310
1028314041464
1181218445118
1225758606526
13515457606911
14451743525
1571518324520
16131517456313
17141637485818
18233233454914
192640425524
2034345616514
21
Sheet5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:G1000Expression=COUNTIFS($B$2:$B$1000,$B2,$C$2:$C$1000,$C2,$D$2:$D$1000,$D2,$E$2:$E$1000,$E2,$F$2:$F$1000,$F2,$G$2:$G$1000,$G2)>1textNO
 
Upvote 0
Solution
Am I using the "Use a formula...." conditional? I don't see anything that would match what you have. TIA
Try:

Book2
ABCDEFG
1
234345616514
3102427355318
46133839536
5273234435213
64233761677
7175456636920
811143147484
9346485310
1028314041464
1181218445118
1225758606526
13515457606911
14451743525
1571518324520
16131517456313
17141637485818
18233233454914
192640425524
2034345616514
21
Sheet5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:G1000Expression=COUNTIFS($B$2:$B$1000,$B2,$C$2:$C$1000,$C2,$D$2:$D$1000,$D2,$E$2:$E$1000,$E2,$F$2:$F$1000,$F2,$G$2:$G$1000,$G2)>1textNO

Am I using the "Use a formula...." conditional? I don't see anything that would match what you have. TIA
 
Upvote 0
Yes, select your range, I used B2:G1000, yours may be different. Then click Conditional Formatting > New Rule > Use a formula > then enter the formula in the formula box. Again, you may need to change the ranges in the formula to match your sheet. Then click Format... and choose your Fill color.

Note that the top left corner of the selected range is B2, and all the individual ranges in the formula ($B2, $C2, $D2, etc.) also refer to row 2. The top selected row must match the row in the formula.
 
Upvote 0
Yes, select your range, I used B2:G1000, yours may be different. Then click Conditional Formatting > New Rule > Use a formula > then enter the formula in the formula box. Again, you may need to change the ranges in the formula to match your sheet. Then click Format... and choose your Fill color.

Note that the top left corner of the selected range is B2, and all the individual ranges in the formula ($B2, $C2, $D2, etc.) also refer to row 2. The top selected row must match the row in the formula.
Perfect, thank you!!
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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