Conditional Format MATCH

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
Hi all

I have the below formula, which works "perfectly", apart from the last part of "I2="ABCDE"

The formula highlights the values in my master sheet if C2 and E2 are not in a row in Sheet6 in Columns D and Column F respectively.

However, I only want the criteria to highlight the cell, if on my master sheet in I2 is ABCDE.

Any other value ion this column, I want it to ignore the rule.

Excel Formula:
=ISERROR(AND(MATCH(C2,'SHEET6'!$D:$D,0),MATCH(E2,'SHEET6'!$F:$F,0),I2="ABCDE"))
 

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).
In what way doesn't it work?
 
Upvote 0
In what way doesn't it work?
It ignores what is in column I. So, whether that value be ABCDE, or DEFGH it will still highlight the cell if the first two parts of the conditional format are correct.
In other words if I deleted the i2=ABCDE, it would do the same without it

I hope that makes sense
 
Upvote 0
That's because you are using iserror & I doubt you formula is working at all.
The only time the cell will NOT be highlighted is when the 1st two conditions are TRUE.
Also I would recommend using countif rather than match
Excel Formula:
=AND(COUNTIF(SHEET6!$D:$D,C2),COUNTIF(SHEET6!$F:$F,E2),I2="ABCDE")
 
Upvote 0
Solution
That's because you are using iserror & I doubt you formula is working at all.
The only time the cell will NOT be highlighted is when the 1st two conditions are TRUE.
Also I would recommend using countif rather than match
Excel Formula:
=AND(COUNTIF(SHEET6!$D:$D,C2),COUNTIF(SHEET6!$F:$F,E2),I2="ABCDE")
Hi Fluff

Thank you - I don't think I explained very well, as I wanted it to do the reverse, highlight when NOT true.

But, the coding you have provided has helped me get the solution, so thank you!
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

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