![]() |
Countif Using Multiple Columns
Can anyone help please?
Column A contains instances of - North, South, East & West Column B contains instances of - High or Low Is there a way to count rows where co, A is North AND col B is High. I have tried COUNTIF, IF, DCOUNTA, but I'm not sure of the right function/combination. Any help would be very much appreciated. -- Thanks, Rob E. |
Countif Using Multiple Columns
=SUMPRODUCT(--(A1:A8="North"),--(B1:B8="High"))
Adjust ranges! You cannot use references to entire columns like A:A in SUMPRODUCT. Regards, Stefi €˛Rob E€¯ ezt Ć*rta: Can anyone help please? Column A contains instances of - North, South, East & West Column B contains instances of - High or Low Is there a way to count rows where co, A is North AND col B is High. I have tried COUNTIF, IF, DCOUNTA, but I'm not sure of the right function/combination. Any help would be very much appreciated. -- Thanks, Rob E. |
Countif Using Multiple Columns
That works perfectly. Thank you very much.
Is there an easy explanation as to why the 2 hyphens (--) are necessary please? Sorry to bother you again. -- Thanks, Rob E. "Stefi" wrote: =SUMPRODUCT(--(A1:A8="North"),--(B1:B8="High")) Adjust ranges! You cannot use references to entire columns like A:A in SUMPRODUCT. Regards, Stefi €˛Rob E€¯ ezt Ć*rta: Can anyone help please? Column A contains instances of - North, South, East & West Column B contains instances of - High or Low Is there a way to count rows where co, A is North AND col B is High. I have tried COUNTIF, IF, DCOUNTA, but I'm not sure of the right function/combination. Any help would be very much appreciated. -- Thanks, Rob E. |
Countif Using Multiple Columns
Adjust the ranges to match--but you can't use whole columns (except in xl2007).
=sumproduct() likes to work with numbers. The -- stuff changes trues and falses to 1's and 0's. Bob Phillips explains =sumproduct() in much more detail he http://www.xldynamic.com/source/xld.SUMPRODUCT.html And J.E. McGimpsey has some notes at: http://mcgimpsey.com/excel/formulae/doubleneg.html Rob E wrote: That works perfectly. Thank you very much. Is there an easy explanation as to why the 2 hyphens (--) are necessary please? Sorry to bother you again. -- Thanks, Rob E. "Stefi" wrote: =SUMPRODUCT(--(A1:A8="North"),--(B1:B8="High")) Adjust ranges! You cannot use references to entire columns like A:A in SUMPRODUCT. Regards, Stefi €˛Rob E€¯ ezt Ć*rta: Can anyone help please? Column A contains instances of - North, South, East & West Column B contains instances of - High or Low Is there a way to count rows where co, A is North AND col B is High. I have tried COUNTIF, IF, DCOUNTA, but I'm not sure of the right function/combination. Any help would be very much appreciated. -- Thanks, Rob E. -- Dave Peterson |
Countif Using Multiple Columns
Thanks for the feedback and to Dave for the really detailed explanation!
Stefi €˛Rob E€¯ ezt Ć*rta: That works perfectly. Thank you very much. Is there an easy explanation as to why the 2 hyphens (--) are necessary please? Sorry to bother you again. -- Thanks, Rob E. "Stefi" wrote: =SUMPRODUCT(--(A1:A8="North"),--(B1:B8="High")) Adjust ranges! You cannot use references to entire columns like A:A in SUMPRODUCT. Regards, Stefi €˛Rob E€¯ ezt Ć*rta: Can anyone help please? Column A contains instances of - North, South, East & West Column B contains instances of - High or Low Is there a way to count rows where co, A is North AND col B is High. I have tried COUNTIF, IF, DCOUNTA, but I'm not sure of the right function/combination. Any help would be very much appreciated. -- Thanks, Rob E. |
All times are GMT +1. The time now is 08:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com