How do I combine COUNTIF and AND functions in Excel

J

J Roney

I am trying to count the entries in column A based on conditions for the
adjacent cells in columns A and B of the same record both being true. I
attempted the entry below but it continually caused the error message to
throw. Suggestions Anyone?

=COUNTIF(AND(('WORKSHEET1'!$A:$A,"Argument_A"),('WORKSHEET1'!$B:$B,"Argument_B"))))
 
B

Bob Phillips

=SUMPRODUCT(--('WORKSHEET1'!$A:$A="Argument_A"),-('WORKSHEET1'!$B:$B="Argume
nt_B"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


J Roney said:
I am trying to count the entries in column A based on conditions for the
adjacent cells in columns A and B of the same record both being true. I
attempted the entry below but it continually caused the error message to
throw. Suggestions Anyone?
=COUNTIF(AND(('WORKSHEET1'!$A:$A,"Argument_A"),('WORKSHEET1'!$B:$B,"Argument
_B"))))
 
P

Peo Sjoblom

=SUMPRODUCT(--(Range1="x"),--(Range2="y"))

note that you cannot use the whole column as range (A:A)

--

Regards,

Peo Sjoblom


J Roney said:
I am trying to count the entries in column A based on conditions for the
adjacent cells in columns A and B of the same record both being true. I
attempted the entry below but it continually caused the error message to
throw. Suggestions Anyone?
=COUNTIF(AND(('WORKSHEET1'!$A:$A,"Argument_A"),('WORKSHEET1'!$B:$B,"Argument
_B"))))
 

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