CountIf Multiple Criteria with #N/A

DDH

Well-known Member
Joined
Sep 25, 2003
Messages
513
CountIf Multiple Criteria with #N/A
I have tried
COUNTIF(COUNTIFS($B$1:$B$5,$B$1:$B$5,{"-#N/A"},$A$1:$A$5,D1))
I thought this would work but something is wrong.

***A*****B*****C****D****E
1*Mon****2**********Mon**2 (Formula Here - E1)
2*Tue****3****************
3*Mon****4****************
4*Thr***#N/A**************
5*Fri****#N/A**************

Thank you for your help
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I did not have this set correctly.
This should make more sense.
To count the "Mon" with numbers only.


COUNTIF(COUNTIFS($B$1:$B$5,$B$1:$B$5,{"-#N/A"},$A$1:$A$5,D1))



***A*****B*****C****D****E
1*Mon****2**********Mon**2 (Formula Here - E1)
2*Tue****3****************
3*Mon****2****************
4*Thr***#N/A**************
5*Mon**#N/A**************
 
Upvote 0
I did not have this set correctly.
This should make more sense.
To count the "Mon" with numbers only.


COUNTIF(COUNTIFS($B$1:$B$5,$B$1:$B$5,{"-#N/A"},$A$1:$A$5,D1))



***A*****B*****C****D****E
1*Mon****2**********Mon**2 (Formula Here - E1)
2*Tue****3****************
3*Mon****2****************
4*Thr***#N/A**************
5*Mon**#N/A**************
Try this...

=COUNTIFS(A1:A10,D1,B1:B10,"<1E100")
 
Upvote 0
T. Valko - Thank you for your help.

What if you had text instead of numbers.

***A*****B*****C****D****E
1*Mon****Dog**********Mon**2 (Formula Here - E1)
2*Tue****Cat****************
3*Mon****Dog****************
4*Thr***#N/A**************
5*Mon**#N/A**************
 
Upvote 0
T. Valko - Thank you for your help.

What if you had text instead of numbers.

***A*****B*****C****D****E
1*Mon****Dog**********Mon**2 (Formula Here - E1)
2*Tue****Cat****************
3*Mon****Dog****************
4*Thr***#N/A**************
5*Mon**#N/A**************
Like this...

=COUNTIFS(A1:A10,D1,B1:B10,"*")
 
Upvote 0
T. Valko - Thank you for your help.

I understood the numbers formula, my approach was way off.
I do not understand the text formula.
COUNTIFS(A1:A10,D1,B1:B10,"*")

What does the "*" do.

Both formulas work perfect, thank you.
 
Upvote 0
T. Valko - Thank you for your help.

I understood the numbers formula, my approach was way off.
I do not understand the text formula.
COUNTIFS(A1:A10,D1,B1:B10,"*")

What does the "*" do.

Both formulas work perfect, thank you.
The asterisk is a wildcard that stands for "any text".
 
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,595
Members
452,927
Latest member
whitfieldcraig

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