Filter formula multi-criteria with exclude.

gwaitsi

New Member
Joined
Apr 19, 2017
Messages
7
Please help with a formula to do the following;
I want to know the Types that have "Orange" or "Red" and no other colors.
e.g. the correct answer is B, C, E
A, D and F should be excluded because they have more than just "Orange" i.e. they have "Blue" as well.

[TABLE="width: 128"]
<tbody>[TR]
[TD]Type
[/TD]
[TD]Color
[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Blue
[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Blue
[/TD]
[/TR]
[TR]
[TD]E
[/TD]
[TD]Red
[/TD]
[/TR]
[TR]
[TD]F
[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]F
[/TD]
[TD]Blue
[/TD]
[/TR]
</tbody>[/TABLE]

Appreciate the help
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
1] Assume your data incl. heading housed in A1:B10

2] In D2, formula copied down :

=IFERROR(INDEX(A$2:A$10,AGGREGATE(15,6,ROW(A$2:A$10)-ROW(A$1)/((COUNTIF(A$2:A$10,A$2:A$10)=1)*((B$2:B$10="Orange")+(B$2:B$10="Red"))=1),ROWS($1:1))),"")

Regards
Bosco
 
Upvote 0
Hi Bosco
Your assumptions are correct. But for some reason, it only detects C & E, not B

cheers
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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