+ Reply to Thread
Results 1 to 6 of 6

Sum distinct values with two criteria

  1. #1
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    14

    Sum distinct values with two criteria

    Hey all,

    I have a question that I believe can be solved with a combination of sum/if/frequency - but am still learning array formulas (started a couple hours ago when this problem arose) so I am posting here in the interim to see if a solution can be found by forum members before I either 1: solve it myself or 2: convince myself that it is impossible.

    I have attached a file which is a sample from a database I am trying to use. I would like to sum the unique values of col B & col D for each category (col c). I have provided an example of the output I am looking for in the attached file.

    I am currently looking through forums & tutorial and am trying to use an array sum(if(frequency on a concatenated column (=col B&col D) but cannot get this to work. My knowledge in excel is above average but has not required me to use array formulas (except when I could just blatantly copy a solution from the internet). Anyone care to help? An explanation of how your formula works would be interesting as well...but if you don't have time, I would like to think I could walk myself through it eventually.

    Cheers
    -poptcorn
    Attached Files Attached Files
    Last edited by poptcorn; 03-13-2014 at 10:17 AM.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sum distinct values with two criteria

    Hi.

    Sorry - not sure I understand. How do Loans, Mortgages and Cash relate to your data table?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Sum distinct values with two criteria

    Wow...stupid error. Re-uploaded, sorry about that!
    Attached Files Attached Files

  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: Sum distinct values with two criteria

    If you are ok with using a helper column, Put this in E3, copied down...
    =IF(COUNTIFS($B$3:B3,B3,$C$3:C3,C3)=1,D3,"")
    Then use this for your totals...
    =SUMIF($C$3:$C$26,B29,$E$3:$E$26)
    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

  5. #5
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Sum distinct values with two criteria

    Appreciate it!

  6. #6
    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: Sum distinct values with two criteria

    Happy to help and thanks for the feedback

+ 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] sum distinct values given variable criteria
    By jsorbet in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-24-2013, 12:54 AM
  2. Count distinct values that correspond to a criteria
    By Eduard in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 04-22-2013, 01:03 PM
  3. Replies: 5
    Last Post: 03-13-2012, 06:05 AM
  4. Formula to COUNTA distinct values with multiple criteria
    By f0urchette in forum Excel General
    Replies: 4
    Last Post: 02-20-2012, 04:54 AM
  5. Count distinct values with criteria
    By greencardioid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-29-2008, 06:48 PM

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