Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    COUNTIF or SUMIF (Excel 2000 SR1)

    I need to use something like COUNTIF or SUMIF where there is more than one criteria. For example, I only want the cell counted if the record contains a certain country (all countries are in one column) AND if the record is for a certain product (all products are in one column in the database)...Rory mentioned using array formulas but I can't get them to work....I would like to add all relevant results into one cell.

    Thanks in advance

    Christa
    <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: COUNTIF or SUMIF (Excel 2000 SR1)

    Hi Christa,
    If you had countries in A1:A6 and products in B1:B6 and you wanted to find how many times USA and Coke were in the same row, you would type:
    =SUM((A1:A6="USA")*(B1:B6="Coke"))
    and then press Ctrl+Shift+Enter to array-enter it.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    New Lounger
    Join Date
    Sep 2001
    Location
    UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: COUNTIF or SUMIF (Excel 2000 SR1)

    If you are still having trouble, try the 'Conditional Sum Wizard' under Tools|Add ins. It should be able to create the array formula for you.

    Cheers,
    Paul

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: COUNTIF or SUMIF (Excel 2000 SR1)

    Thanks, Rory...that worked. Now I have a related question...I need a similar sort of formula that would essentially use a Sumif formula only it has to look at 2 criteria. For example, I want it to look at a range called country and pick out "Canada", look at a range called "Version" and pick out "Accpac" and then sum all the cells in a range called Quantity, that meet those criteria.

    Any ideas?

    Thanks,

    Christa

  5. #5
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: COUNTIF or SUMIF (Excel 2000 SR1)

    Try the array formula, {=SUM(IF(Country="Canada",IF(Version="Accpac",Quan tity,""),""))} where the braces are entered by Excel when you press Ctrl+Shift+Enter. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: COUNTIF or SUMIF (Excel 2000 SR1)

    Try this Array formula:

    <pre>=SUM((Country="Canada")*(Version="Accpac")*(C 1:C5))
    </pre>

    Legare Coleman

Posting Permissions

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