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!!!

Column 1 Column 2Column 3
BlueYes
BlueYes
BlueNoFail
RedNo
RedNoPass

<tbody>
</tbody>
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
=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,215,474
Messages
6,125,024
Members
449,204
Latest member
LKN2GO

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