+ Reply to Thread
Results 1 to 5 of 5

sum on multiple criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    01-13-2004
    Posts
    42

    sum on multiple criteria

    Hello,
    Happy New Year!

    I hope you can help with the following.
    I have a worksheet as follows:

    col a---col b
    1------ $(100)
    2-------$50
    3-------$20
    2-------$(30)
    4-------$10
    4-------$(20)

    I would like to sum colum b if the sum relating to col a is greater 0 i.e.

    result: $40 based on:
    col a----col b
    1---------$0
    2---------$20
    3---------$20
    4---------$0

    Thank you so much!

  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 on multiple criteria

    Assuming you list the unique column a values in say, D1:D4, then in E1:

    =MAX(0,SUMIF($A$1:$A$6,D1,$B$1:$B$6))

    copied down

    Adjust as necessary.
    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
    01-13-2004
    Posts
    42

    Re: sum on multiple criteria

    Thank you.
    Just wondering if there is another way to do this without having to list out the unique values in another column. The reason is that I am trying to design a template and so the unique values might be different for other users.

  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 on multiple criteria

    Not sure what you mean.

    Do you want a Pivot Table,

    Which automatically lists the unique values and the respective sums?

  5. #5
    Registered User
    Join Date
    01-13-2004
    Posts
    42

    Thumbs up Re: sum on multiple criteria

    Thanks, I'll go with the max formula and extra column suggested instead of using a pivot table.

+ 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