Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
linking multiple columns onto multiple worksheets talderman Excel Discussion (Misc queries) 3 August 23rd 06 02:00 AM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Using Countif on multiple columns ingeman Excel Worksheet Functions 1 July 17th 06 06:08 AM
Filtering Text Data from Multiple columns Brad Excel Worksheet Functions 6 January 1st 05 03:32 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"