Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default How do I count values across multiple columns?

I have the following fields in a spreadsheet:

Order Number
Product A
Product B

I created the following to count the number of orders that had 1 or
more of Product A or 1 or more of Product B in them:

Count of Prod A: (=COUNTIF(D2:D8611, "0")
Count of Prod B: (=COUNTIF(E2:E8611, "0")

Now, what I'd like to do is create a column that will display the
number of orders that have both Product A and Product B.

I've tried this: =(COUNTIF(D2:D8611,"0")+COUNTIF(E2:E8611,"0")) but
that gives me the sum of both fields where there is 1 or more product.
Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default How do I count values across multiple columns?

=SUMPRODUCT(--(D2:D86110),--(E2:E86110))


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have the following fields in a spreadsheet:

Order Number
Product A
Product B

I created the following to count the number of orders that had 1 or
more of Product A or 1 or more of Product B in them:

Count of Prod A: (=COUNTIF(D2:D8611, "0")
Count of Prod B: (=COUNTIF(E2:E8611, "0")

Now, what I'd like to do is create a column that will display the
number of orders that have both Product A and Product B.

I've tried this: =(COUNTIF(D2:D8611,"0")+COUNTIF(E2:E8611,"0")) but
that gives me the sum of both fields where there is 1 or more product.
Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default How do I count values across multiple columns?

Thanks :)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
brucek
 
Posts: n/a
Default How do I count values across multiple columns?

Using this sumproduct formula, what would be the syntax to find a value say
greater than 5 but less than 10?

"Bob Phillips" wrote:

=SUMPRODUCT(--(D2:D86110),--(E2:E86110))


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have the following fields in a spreadsheet:

Order Number
Product A
Product B

I created the following to count the number of orders that had 1 or
more of Product A or 1 or more of Product B in them:

Count of Prod A: (=COUNTIF(D2:D8611, "0")
Count of Prod B: (=COUNTIF(E2:E8611, "0")

Now, what I'd like to do is create a column that will display the
number of orders that have both Product A and Product B.

I've tried this: =(COUNTIF(D2:D8611,"0")+COUNTIF(E2:E8611,"0")) but
that gives me the sum of both fields where there is 1 or more product.
Thanks in advance.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How do I count values across multiple columns?

Using this sumproduct formula, what would be the syntax to find a value say
greater than 5 but less than 10?
=SUMPRODUCT(--(D2:D86110),--(E2:E86110))


What does "find a value" mean?

That formula COUNTS the number of times that column D is greater than 0
while the corresponding cell in column E is also greater than 0.

To COUNT the number of instances where column D is 5 AND column E is <10:

=SUMPRODUCT(--(D2:D86115),--(E2:E8611<10))

D...............E
5................9
6................10
7................9

Using the above example the result woud be 1.

Biff

"brucek" wrote in message
...
Using this sumproduct formula, what would be the syntax to find a value
say
greater than 5 but less than 10?

"Bob Phillips" wrote:

=SUMPRODUCT(--(D2:D86110),--(E2:E86110))


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have the following fields in a spreadsheet:

Order Number
Product A
Product B

I created the following to count the number of orders that had 1 or
more of Product A or 1 or more of Product B in them:

Count of Prod A: (=COUNTIF(D2:D8611, "0")
Count of Prod B: (=COUNTIF(E2:E8611, "0")

Now, what I'd like to do is create a column that will display the
number of orders that have both Product A and Product B.

I've tried this: =(COUNTIF(D2:D8611,"0")+COUNTIF(E2:E8611,"0")) but
that gives me the sum of both fields where there is 1 or more product.
Thanks in advance.






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
Count Intervals of 2 Numeric values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 12 September 24th 05 10:58 PM
Count the occurence of multiple (4 conditions). - Need urgent help CT Excel Discussion (Misc queries) 5 May 3rd 05 04:47 AM
Count on multiple columns Emece Excel Worksheet Functions 2 March 4th 05 02:52 PM
Count occurances of multiple values BaseballFan Excel Worksheet Functions 2 February 17th 05 08:31 AM
Pivot Table combining multiple columns Pete Petersen Excel Discussion (Misc queries) 1 January 13th 05 07:56 PM


All times are GMT +1. The time now is 06:05 AM.

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"