+ Reply to Thread
Results 1 to 7 of 7

Sumif based on a text range, text criteria and and text sum range

  1. #1
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Sumif based on a text range, text criteria and and text sum range

    Hi.

    I have a sheet with some financial ratios which have either been 'passed' or 'failed'. These are for various sites, each of which is in one of three states. I basically want to find the average pass rate/fail rate for each state. So my final product would be a table, with a three states in the column, then the headings for the rest of the table columns would be XYZ ratio, ABC ratio, 123 ratio etc. The table will then have the percent of passes or fails for that ratio, in that state.

    The issue I face is for the pass/fail situation, there is also an 'N/A' or 'Div/0' which I would want omit when I calculate the overall average of pass or fails.

    See attached sheet for an idea of what it's like.

    Any ideas?

    Cheers
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Sumif based on a text range, text criteria and and text sum range

    use the following formula, copied down and across in your table on sheet2..

    =COUNTIFS('Raw Data'!$A$2:$A$11,$A2,'Raw Data'!B$2:B$11,"Pass")

    change the "Pass" to "Fail" if you want to count them, or, as an alternative, reference your criteria by putting the "Pass/Fail" in a seperate cell, and then referencing that cell from the formula above
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Sumif based on a text range, text criteria and and text sum range

    just additional w/ regards to Fdibbins

    =COUNTIFS('Raw Data'!$A$2:$A$11,$A2,'Raw Data'!B$2:B$11,"Pass")/COUNTIF('Raw Data'!$A$2:$A$11,A2)
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Sumif based on a text range, text criteria and and text sum range

    @ vlady thanks for picking up that i hadnt included the ratio/%

  5. #5
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Sumif based on a text range, text criteria and and text sum range

    Thanks mate!

    I wasted 2 hours of the morning on this and you nailed it in 10 mins.

    Perfect!

    Good spot on the ratio bit as well vlady. Cheers

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Sumif based on a text range, text criteria and and text sum range

    @ ned0

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Sumif based on a text range, text criteria and and text sum range

    ^no worries Cutter.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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