+ Reply to Thread
Results 1 to 11 of 11

Formula with multiple ctriteria (Sum(Countif)

  1. #1
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Formula with multiple ctriteria (Sum(Countif)

    Happy Monday all,

    I was wondering if it is possible to set two cirteria for an (=sum)? I currently use this formula for the department Totals
    Please Login or Register  to view this content.
    I then change {"..."} depending on the job status to get all of the totals.

    The thing is they now want to see totals for each rep for each status.... Reps are in one colmun and the status in another. And since am asking they are also wanted to know the Average time per status that is in a thrid column.. lol
    Attached Files Attached Files
    Last edited by kokapelly; 01-13-2014 at 10:56 AM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Formula with multiple ctriteria (Sum(Countif)

    A pivot table would easily give you counts and averages, by rep, by status, as you need.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Formula with multiple ctriteria (Sum(Countif)

    I tried that with little success, but if that is the best way to go i will put some more effort into it..

  4. #4
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Formula with multiple ctriteria (Sum(Countif)

    Well i found a formula that worked
    Please Login or Register  to view this content.
    . Is it possible to add an additional criteria to the formula? So Column "F" is the rep and "G" is the status and i would love to add column "R" that holds the time to complete per job. Also can the result be an average of the total?

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula with multiple ctriteria (Sum(Countif)

    Quote Originally Posted by kokapelly View Post
    =SUM(COUNTIF(RawData!A2:Q1715,{"Complete"}))
    This syntax is only required if you are counting more than one item in the range, e.g.

    =SUM(COUNTIF(RawData!A2:Q1715,{"Complete","Nearly Complete"}))

    if you only have one status (Complete) you can use a simple COUNTIF like this

    =COUNTIF(RawData!A2:Q1715,"Complete")

    For 2 criteria in different columns, try COUNTIFS (with an "S") - it's more efficient than SUMPRODUCT

    =COUNTIFS(RawData!F:F,"P101105",RawData!G:G,"Complete")

    You can add more criteria, what is the criteria for the time column?

    For averaging you can use AVERAGEIFS to average with conditions
    Last edited by daddylonglegs; 01-13-2014 at 12:02 PM.
    Audere est facere

  6. #6
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Formula with multiple ctriteria (Sum(Countif)

    Cool Thank you that helps a lot. Can i add a third criteria to the countifs?

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula with multiple ctriteria (Sum(Countif)

    Yeah, sure you can add an almost unlimited amount, e.g. for column R to be > 1

    =COUNTIFS(RawData!F:F,"P101105",RawData!G:G,"Complete",RawData!R:R,">1")

  8. #8
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Formula with multiple ctriteria (Sum(Countif)

    How about an Average for column R? sorry for all the questions

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula with multiple ctriteria (Sum(Countif)

    If you want to average column R where the other two conditions are true use AVERAGEIFS like this:

    =AVERAGEIFS(RawData!R:R,RawData!F:F,"P101105",RawData!G:G,"Complete")

    The range to average (in green) always goes at the start, followed by range, condition, range, condition, range, condition.......etc.

  10. #10
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Formula with multiple ctriteria (Sum(Countif)

    Hmm got a result of False

  11. #11
    Forum Contributor
    Join Date
    10-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Formula with multiple ctriteria (Sum(Countif)

    Never mind... i made a mistake... Thank you so much for all your help

+ 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] Noob To R1C1 format, New Formula Received and I Need Help Please.
    By DHartwig35805 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-12-2013, 04:04 PM
  2. Noob question - How to edit a formula across workbooks - shortcut?
    By webbt01 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-04-2012, 07:45 PM
  3. [SOLVED] Conditional Formatting Formula needed for noob
    By Patrick Byrne in forum Excel General
    Replies: 1
    Last Post: 04-04-2012, 05:48 PM
  4. Noob help with a formula
    By tmmgem in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-12-2008, 03:03 PM
  5. Noob here
    By writeguy37 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-28-2008, 09:20 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