ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTA, COUNTIF? (https://www.excelbanter.com/excel-worksheet-functions/18232-counta-countif.html)

Newbie

COUNTA, COUNTIF?
 
I am trying to perform a COUNTA on one column based on the values held in two
other columns, but I can't get the correct syntax.

It's for football results and has the following set-up.

Column A = Type (PREM, or LGCP)
Column D = Result (W, D or L)

I am trying to count the number of each Result if Type = PREM

So, W should be a COUNTA if $D$2:$d$44 = W and $A$2:$A$44 = "PREM"

Can someone please put me out of my misery.

Thanks.



Akhilesh Dalia

Hi!
Forget COUNTA use SUMPRODUCT

=SUMPRODUCT(--($A$2:$A$44="PREM"),--($D$2:$D$44="W"))

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom

"Newbie" wrote:

I am trying to perform a COUNTA on one column based on the values held in two
other columns, but I can't get the correct syntax.

It's for football results and has the following set-up.

Column A = Type (PREM, or LGCP)
Column D = Result (W, D or L)

I am trying to count the number of each Result if Type = PREM

So, W should be a COUNTA if $D$2:$d$44 = W and $A$2:$A$44 = "PREM"

Can someone please put me out of my misery.

Thanks.




All times are GMT +1. The time now is 08:21 AM.

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