VBA - Lookup and then execute conditional format for selected cells.

LittleJon

New Member
Joined
Oct 14, 2018
Messages
18
Is it possible to look up a cells text, then check in a range and if there is a match highlight certain cells/rows

https://ibb.co/XyPkXDw

Lets say on the link that in the header "Country" is A1.

Currently using conditional formatting you can see some of the countries listed are highlighted, this is because they match the same country name in a range which starts from A100.

What i would like is for the code/formula to highlight A3:F3 if A3 matches a name in the range. Please note that the country name in A2, A3 etc can vary from day to day, but the color will always remain the same.

I've tried so many different type of formulas and codes for this, but to no avail. Any help would be appreciated.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

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