Countif with OR

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, I need formula for Countif with OR
B2 = Count if A1= Xs1 or Count if A2= 9.5
My result should be 1 if A1/A2 = "" or any other critiria there.
But if any of or both of the cells meets the critiria still answer will be 1
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You should be able to adapt this

=COUNTIF($D$2:$L$2,{"A"})+COUNTIF($D$2:$L$2,{"B"})+COUNTIF($D$2:$L$2,{"C"})
 
Upvote 0
Trevor, i have tried this...'=SUM(COUNTIF(B2:B15,$A$16),COUNTIF(B2:B15,$F$22)) also the formula you gave ..'=COUNTIF(B1:B15,A17)+COUNTIF(B1:B15,G23)
but it gives result as 2....


A16 has = Xs1 or Count if F22 has = 9.5 and the result should be = 1 though both has the critiria
 
Last edited:
Upvote 0
okay this formula works perfect.
=IF($A$16="x",COUNTIF(B2:B15,"x"),COUNTIF(B2:B15,"y")) but when i enter the time it does not work. Please help.
 
Upvote 0
Can you use Excel Jeanie to show some of the table and then explain what you need, by refering to time it doesn't help without seeing the data.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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