+ Reply to Thread
Results 1 to 5 of 5

How do I count values across multiple columns?

Hybrid View

Guest How do I count values across... 01-09-2006, 06:45 PM
Guest Re: How do I count values... 01-09-2006, 07:15 PM
Guest Re: How do I count values... 01-09-2006, 07:25 PM
Guest Re: How do I count values... 03-21-2006, 05:55 PM
Guest Re: How do I count values... 03-21-2006, 07:20 PM
  1. #1
    elsenorjose@sbcglobal.net
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: How do I count values across multiple columns?

    =SUMPRODUCT(--(D2:D8611>0),--(E2:E8611>0))


    --

    HTH

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


    <elsenorjose@sbcglobal.net> wrote in message
    news:1136846564.545421.66110@g47g2000cwa.googlegroups.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. #3
    elsenorjose@sbcglobal.net
    Guest

    Re: How do I count values across multiple columns?

    Thanks


  4. #4
    brucek
    Guest

    Re: 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:D8611>0),--(E2:E8611>0))
    >
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > <elsenorjose@sbcglobal.net> wrote in message
    > news:1136846564.545421.66110@g47g2000cwa.googlegroups.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. #5
    Biff
    Guest

    Re: 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:D8611>0),--(E2:E8611>0))


    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:D8611>5),--(E2:E8611<10))

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

    Using the above example the result woud be 1.

    Biff

    "brucek" <brucek@discussions.microsoft.com> wrote in message
    news:167BA7AA-5E08-4409-9F56-59F3664995D1@microsoft.com...
    > 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:D8611>0),--(E2:E8611>0))
    >>
    >>
    >> --
    >>
    >> HTH
    >>
    >> RP
    >> (remove nothere from the email address if mailing direct)
    >>
    >>
    >> <elsenorjose@sbcglobal.net> wrote in message
    >> news:1136846564.545421.66110@g47g2000cwa.googlegroups.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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1