Color code on another cell if cell has duplicate value

aayaanmayank

Board Regular
Joined
Jul 20, 2018
Messages
157
Hi All,

Can anyone help me with. i have below data, if ID is duplicate then do the green color on next cell else yellow color...

IDCountry name
306560 US
4569087 US
896880 US
896880 KR
9970980 US
9970980 US
423489 US
8076070 US
8858780 US
98724US

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
i would use 2 conditional rules

rule 1 for any duplicate - yellow
=COUNTIF(A2:A11,A2)>1

rule 2 for next cell - green - use and put last in the order
=A2=A1
 
Upvote 0
use
=OR(A1=A2,A2=A3)

IDCountry name
306560US
4569087US
896880US
896880KR
9970980US
9970980US
423489US
8076070US
8858780US
4569087US

<colgroup><col span="2"></colgroup><tbody>
</tbody>
 
Last edited:
Upvote 0
oh, OK - probably useful to have put that in the subject/title
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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