+ Reply to Thread
Results 1 to 7 of 7

Countifs()

  1. #1
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Countifs()

    This seems to work nicely,

    =countifs(A:A,"large",B:B,"pizza")+countifs(A:A,"large",B:B,"pasta")

    Yet putting it all in the one will not work, i.e.

    =countifs(A:A,"large",B:B,or("pizza","pasta"))

    Is there a way to achieve this?

    Thx, MQ
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Countifs()

    Hi MQ,

    Try: =SUM(COUNTIFS(A:A,"large",B:B,{"pizza","pasta"}))

  3. #3
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Re: Countifs()

    Worked nicely!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Countifs()

    Glad to hear it. Thanks for the rep point.

    Don't forget to mark the thread as SOLVED if you're happy you have your answer.

    BSB.

  5. #5
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Re: Countifs()

    For not equals, which is correct?

    =SUM(COUNTIFS(A:A,"large",B:B,"<>{"pizza","pasta"}"))

    =SUM(COUNTIFS(A:A,"large",B:B,{"<>pizza","<>pasta"}))

    MQ

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Countifs()

    Hi,

    Actually that's no longer an OR statement, but an AND statement, so you need:

    =SUM(COUNTIFS(A:A,"large",B:B,"<>pizza",B:B,"<>pasta"))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Countifs()

    you can also use a pivot table for that kind of work.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] CountIFS + OR
    By xygrax in forum Excel General
    Replies: 6
    Last Post: 02-15-2014, 01:24 AM
  2. [SOLVED] Countifs & Contains?
    By freyrand in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2014, 11:31 AM
  3. COUNTIFS OR COUNTIFS needs to work
    By joshbellfi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 10:55 AM
  4. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  5. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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