Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
linking multiple columns onto multiple worksheets | Excel Discussion (Misc queries) | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Using Countif on multiple columns | Excel Worksheet Functions | |||
Filtering Text Data from Multiple columns | Excel Worksheet Functions |