ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I combine COUNTIF and AND functions in Excel (https://www.excelbanter.com/excel-worksheet-functions/13278-how-do-i-combine-countif-functions-excel.html)

J Roney

How do I combine COUNTIF and AND functions in Excel
 
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"),('W ORKSHEET1'!$B:$B,"Argument_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" <J wrote in message
...
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"),('W ORKSHEET1'!$B:$B,"Argument
_B"))))



Peo Sjoblom

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

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

--

Regards,

Peo Sjoblom


"J Roney" <J wrote in message
...
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"),('W ORKSHEET1'!$B:$B,"Argument
_B"))))




All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com