MATCH in Conditional Formatting

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
567
Office Version
  1. 365
Platform
  1. Windows
I have the following formula in Conditional Formatting
=MATCH($D2,LIST,0)
If anything in column D matches any of the data in LIST column its to highlight it, but if it does not match the LIST the data in D2 is cleared with a "" in a IF(LOOKUP) formula.
The cell highlights when it matches but when the cell is blank it still highlights.

How can I write the formula so to highlight when it matches the LIST but when its blank (and does not match on LIST) is does not highlight?

Thanks,
James
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about:
Excel Formula:
=AND(MATCH($D2,LIST,0),$D2<>"")
or
Excel Formula:
=COUNTIF(LIST,$D2)>0
Also, make sure that there are not any "blanks" in your LIST.
 
Upvote 0
How about:
Excel Formula:
=AND(MATCH($D2,LIST,0),$D2<>"")
or
Excel Formula:
=COUNTIF(LIST,$D2)>0
Also, make sure that there are not any "blanks" in your LIST.
The list is about 30 rows down and data is filled in over time so there could be 1 cell with data and 29 blanks. Eventually all will be filled but not right away.
 
Upvote 0
The list is about 30 rows down and data is filled in over time so there could be 1 cell with data and 29 blanks. Eventually all will be filled but not right away.
OK, then I think either of these formulas should work:
Excel Formula:
=AND(MATCH($D2,LIST,0),$D2<>"")

or
Excel Formula:
=AND(COUNTIF(LIST,$D2)>0,$D2<>"")
 
Upvote 0
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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