Conditional to identify the duplicates based on the first value

ramananhrm

Board Regular
Joined
Apr 19, 2011
Messages
156
Hi,

I have a doubt on conditional formatting.

The Column a1 to a10 has company names listed & b1 to b10 has their products.

If the company name repeat more than once, it has to search the repeated product of the same company.

Example

In the range a1:a20 has three companies (c1, c2 & c3)
The c1 has to search the range b1:b20 for the duplicate product (c1p1, c1p1, c1p2, c2p2)

It has to format the duplicate value of the duplicate value of the c1.

Please help me out.

Regards,
Ramanan
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
It is not entirely clear to me.

1. What version of Excel are you using?

2. For this sample data do I have the correct cells highlighted? If not, which cells should be highlighted, and why?

Excel Workbook
AB
1CompanyProduct
2c1p1
3c2p2
4c3p1
5c3p3
6c2p2
7c2p4
8c2p3
9c3p2
10c1p5
11c1p5
12c2p2
13c3p1
14c2p2
15c1p3
16
CF
 
Upvote 0
Hi Peter,

In the below mentioned example, the company Sony has a duplicate model 'Model 1' is highlighted from second time because the 'Model 1' is already exists in the fourth row.

The same way for the the company 'Samsung'. The 'Model 3' exist in the sixth row. It is repeating in the last row.

I hope this example give you a clear idea of how to conditionally format the duplicate value (Product) based on the first range.


Company Product
Sony Model 1
Nokia Model 1
Samsumg Model 1
Sony Model 1
Nokia Model 2
Samsumg Model 3
Sony Model 3
Nokia Model 1
Samsumg Model 4
Sony Model 5
Nokia Model 6
Samsumg Model 7
Sony Model 1
Nokia Model 9
Samsumg Model 10
Sony Model 11
Nokia Model 12
Samsumg Model 3
 
Upvote 0
Select B2:B?? and apply the CF shown.

Excel Workbook
AB
1CompanyProduct
2SonyModel 1
3NokiaModel 1
4SamsumgModel 1
5SonyModel 1
6NokiaModel 2
7SamsumgModel 3
8SonyModel 3
9NokiaModel 1
10SamsumgModel 4
11SonyModel 5
12NokiaModel 6
13SamsumgModel 7
14SonyModel 1
15NokiaModel 9
16SamsumgModel 10
17SonyModel 11
18NokiaModel 12
19SamsumgModel 3
CF 2007+
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B21. / Formula is =COUNTIFS($A$1:$A1,$A2,$B$1:$B1,$B2)Abc
 
Upvote 0
Hi Peter,

Thank you very much.

It really worked.

I have made a minor change in the formula.

=COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2)>1

Thank you very much for the help.

Thanks.
Ramanan
 
Upvote 0
That should work but I'm not sure why you made that change.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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