Formula for Filtering Multiple Cells

arceaf

New Member
Joined
Jun 12, 2013
Messages
10
Hi,

Hoping someone could help me with this problem below. I have recreated an excel sheet below. Column 1 is the color, Column 2 is the response (Yes/No), and column 3 is blank.

Is there a formula I can write in column 3 that will help me identify if, for a specific color, only "No" was selected on column B. For example - Blue is listed as "Yes" "Yes" "No" - so it would fail.

Red is listed as "No" and "No" - so, it would pass

Thanks!!!

[TABLE="width: 500"]
<tbody>[TR]
[TD]Column 1 [/TD]
[TD]Column 2[/TD]
[TD]Column 3[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD]Yes[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD]Yes[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD]No[/TD]
[TD]Fail[/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD]No[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD]No[/TD]
[TD]Pass[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
=IF(B1="Yes","Pass", "Fail")

or

=IF(AND(A1="Blue", B1="Yes"),"Pass","Fail")

The first formula will provide a pass/fail outcome based off of Yes or no in column B. The second formula will only produce a Pass if the value in column A is Blue and column b is Yes
 
Upvote 0
=IF(AND(A1="Blue", B1="Yes"),"Pass",IF(AND(A1="Red",B1="Yes"),"Pass","Fail"))

This is if you wanted to look for more than just one specific color. This formula will provide a Pass result if the value in A1 is blue or red and B1 is Yes.
 
Upvote 0
And I just realized I misread.

=IF(AND(B1="Yes",B2="Yes",B3="Yes"),"Pass","Fail")

If it's always in the same cell ranges this would do it
 
Upvote 0
How about
=IF(COUNTIF($A$2:$A$6,A2)=COUNTIFS($A$2:$A$6,A2,$B$2:$B$6,B2),"Pass","Fail")
 
Upvote 0
How about
=IF(COUNTIF($A$2:$A$6,A2)=COUNTIFS($A$2:$A$6,A2,$B$2:$B$6,B2),"Pass","Fail")

This was close but it did not work. I has instances where all cells were "Yes" for a color and it returned a pass. The ideas is that, since all cells are "Yes", it would return a "fail"...only if all calles are "No" would I want a pass.

Any changes you could make?
 
Upvote 0
In that case try
=IF(COUNTIF($A$2:$A$8,A2)=COUNTIFS($A$2:$A$8,A2,$B$2:$B$8,"No"),"Pass","Fail")
 
Last edited:
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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