Nesting AND inside the COUNTIF Function

S

suejay

Should I be able to nest the AND function inside the
COUNTIF function to include more than one range? I get
an error msg. when I try to include more than one range
in the countif function??? Help, please!
 
S

Suejay

I want to count a specific "text" response, like "yes"
or "no". Hope that's clear.
Thanks!
 
F

Frank Kabel

Hi
not really :)
please post some example rows of your data (plain text - no attachments
please) and describe your expected result
 
H

hgrove

Aladin Akyurek wrote...
=COUNTIF(Range,"Yes")

=COUNTIF(Range,"No")
...

One interpretation of what the OP has written. Others would be

=COUNTIF(RangeA,"Yes")+COUNTIF(RangeB,"Yes")

or

=SUMPRODUCT((RangeA="Yes")*(RangeB="Yes")
 
G

Gary Thomson

Or:

Define a name for the combined range:

Highlight the first range, then hold Control and highlight
the second range.

now hit Alt+F3 and type a name in for your range.

In the Countif statement, hit F3 and paste the name in in
place of the "Range" and the function will work.

Happy to help,

Gary Thomson
Edinburgh, Scotland
 
H

hgrove

Gary Thomson wrote...
Or:

Define a name for the combined range: ...
In the Countif statement, hit F3 and paste the name in in place
of the "Range" and the function will work.

Happy to help,
...

If you want to help, test your suggestions.

COUNTIF and SUMIF don't support multiple area ranges. A formula like

=COUNTIF((A1:A6,C1:C6),">3")

will ALWAYS return #VALUE! Even if you name (A1:A6,C1:C6) XYZ, th
formula

=COUNTIF(XYZ,">3")

will also ALWAYS return #VALUE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top