Highlight common values and highlight diffenent values

Kunal2611

New Member
Joined
Jun 30, 2015
Messages
1
I have country and city list separated based on the continents. We are collecting information of places visited.

<code>1A Argentina
2A Brazil
3A Canada
4A United States

5A Newyork
6A Chicago
7A Washington
8A Toronto
9A Vancouver
10A Hamilton
11A São Paulo
12A Rio
13A Buenos Aires
14A Córdoba
15A China
16A Japan
17A India

18A Mumbai
19A Banglore
20A Delhi
21A Tokyo
22A Hirroshima
23A Beijing
24A Shanghai

</code>what I want to get is based on the places visited I need to highlight different places a user can visit in the same continent.
User has entered the value the single cell and values are separated by commas.
CASE 1:
User Enters - Canada,Toronto,Beijing
Expected result -

  1. Highlight Canada,Toronto,Beijing in Green
  2. Highlight Newyork,Chicago,Washington,Vancouver,Hamilton,São Paulo,Rio,Buenos Aires,Córdoba,Mumbai,Banglore,Delhi,Tokyo,Hirroshima,Shanghai in Yellow
CASE 2:
User Enters - Japan
Expected Result -

  1. Highlight Japan in Green
  2. Highlight Mumbai,Banglore,Delhi,Tokyo,Hirroshima,Beijing,Shanghai in Yellow
CASE 3:
User Enters - Washington, Rio
Expected Result -

  1. Highlight Washington, Rio in Green
  2. Higlight Newyork,Chicago,Toronto,Vancouver,Hamilton,São Paulo,Buenos Aires,Córdoba in Yellow
<code>I have tried conditional formatting to match one search as below:
=IF(ISERROR(SEARCH("*"&$C4&"*", $C$1)>0), FALSE, TRUE)

Searching for the solution I m stuck..
</code>
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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