+ Reply to Thread
Results 1 to 6 of 6

Sum if following criteria match

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    Ulm
    MS-Off Ver
    Excel 2003
    Posts
    28

    Sum if following criteria match

    Dear all ,

    In the attachment you can find a dummy example of my problem ,that I want to simplify. I need to sum the amounts that are in column A , but based on the ratings (column B). On the right side you have the criteria bins. For example sum all values in column A if they are rated AA, AA- , AA+. Or sum values from column A if they are rated BBB;BBB+;BBB-;Baa. So the formula should sum only values that have this criteria and will place the sum in the appropriate bins on the right.

    I have done this assignment by doing filtering and then summing up rating by rating but wanted to see how can I use formula in solving this.

    Thanks for help,

    Bjelinski
    Attached Files Attached Files
    Last edited by bjelinski; 07-22-2010 at 04:42 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum if following criteria match

    Does this work?

    Please Login or Register  to view this content.
    adjust ranges to suit your data.
    Where there is a will there are many ways.

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

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

  3. #3
    Registered User
    Join Date
    06-22-2010
    Location
    Ulm
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Sum if following criteria match

    Just tried the formula, but it doesnt give me the right amounts, dont really understand why? because it looks a little bit complicated...

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum if following criteria match

    As far as my testing went.. they all resulted in correct sums...

    The only thing I neglected to tell you was to change the last Rating in F7 to N R to be consistent with your column B entries...

  5. #5
    Registered User
    Join Date
    06-22-2010
    Location
    Ulm
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Sum if following criteria match

    NBVC,

    it works now. It is very sensitive to spaces , so i fixed it a little bit and did a check up by summing the values. They are equal. I am adding the solution, for others to use it for revision.

    Thanks!

    Take Care!
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum if following criteria match

    I would have suggested that clean up.. but usually I am met with the response, that "I don't have control over that setup"... so I basically worked around it...

    But if you do clean it up to that point, then we can get rid of a the Substitute() functions and reduce it to:

    =SUMPRODUCT(--(ISNUMBER(SEARCH(" "&$B$2:$B$68&" "," "&TRIM(F2)&" "))),$A$2:$A$68)

+ 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.6.0 RC 1