+ Reply to Thread
Results 1 to 8 of 8

Thread: COUNTIF - 2 Conditions

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    111

    COUNTIF - 2 Conditions

    I have a workbook with two sheets

    One sheet has all the data on it

    E.g.
    Date, Time, Priority, Month

    The other sheet is a summary sheet to show

    How many tickets were raised in one month
    And How many priority tickets were raised in one month (e.g. LOW, MEDIUM, HIGH)

    I would like the formula to count how many HIGH priority tickets there were for the month of August, September, etc.

    I am using this formula but its counting all the HIGH priority tickets:

    =IF(COUNTIF('All Incidents'!$O:$O,"8"),COUNTIF('All Incidents'!$H:$H,"HIGH"),"0")
    "8" being the month (August)

    Am I going about this all wrong?

  2. #2
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472

    Re: COUNTIF - 2 Conditions

    Hi,

    Try this:

    =SUMPRODUCT(('All Incidents'!$O1:$O10000,"8")*('All Incidents'!$H1:$H10000,"HIGH"))
    Please disregard anything in the above post. It may well have been edited without my consent, as has been the case with several posts and threads recently.

  3. #3
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,520

    Re: COUNTIF - 2 Conditions

    Why not use a Pivot Table?

  4. #4
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    111

    Re: COUNTIF - 2 Conditions

    Hi thanks for the formula - I tried it and it said "The formula you typed contains an error..."

    Not sure on how to use pivot tables... Is that quicker and easier?

  5. #5
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: COUNTIF - 2 Conditions

    I think sweep was in COUNTIF mode when putting that together

    should read:

    =SUMPRODUCT(('All Incidents'!$O1:$O10000="8")*('All Incidents'!$H1:$H10000="HIGH"))
    are you sure you need the 8 as a text string ie "8" and not 8 ?

    Pivot Tables are easy to get to grips with and much better than lots of expensive formulae - ie if you intend to use the above frequently then use a pivot table - see link in my sig. for a general intro ...

  6. #6
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472

    Re: COUNTIF - 2 Conditions

    Sweep was indeed in COUNTIF mode, and apologises for his foolishness.

  7. #7
    Registered User
    Join Date
    02-18-2004
    Posts
    4

    Re: COUNTIF - 2 Conditions

    sorry to reopen an old thread but I have a similar issue except I want to use a cell reference as the Month eg cell "A1" = January

    =SUMPRODUCT(('All Incidents'!$O1:$O10000=A1)*('All Incidents'!$H1:$H10000="HIGH")) but I just get a value reading

  8. #8
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: COUNTIF - 2 Conditions

    Welcome to the forum,

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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.2.0