Results 1 to 4 of 4

Thread: Sum of unique values in a column based on values in another column

  1. #1

    Sum of unique values in a column based on values in another column



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,
    Please find an example of my data attached.


    I have a list of customers in column A and # of units sold to them in column B. I need to come up with a formula that will sum up values in column B based on 'unique' values in column A. So, e.g. when it comes to summing up # of units sold to customer 100620, I only want to sum up 19 in the final total and not 38 as you can see in column B as the # of units sold to a customer 100620.


    Very much appreciate your help in advance.
    Thanks!
    Attached Files Attached Files

  2. #2
    Wizard Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,615
    Articles
    0
    Excel Version
    2010 on Xubuntu

  3. #3
    You might be able to accomplish this by using the SUMIF function.

  4. #4
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    869
    Articles
    0
    Excel Version
    Excel 2013
    Quote Originally Posted by pandyav View Post
    Very much appreciate your help in advance.
    You can extract the unique in column D.
    If D2 condition then try formula
    Code:
    =SUMIF($A$2:$B$5;D2;$B$2:$B$5)
    or
    =SUMPRODUCT(($B$2:$B$5)*($A$2:$A$5=D2))
    btw: see Unique vs Distinct
    Last edited by navic; 2015-10-08 at 07:09 AM.
    My personal Web Excel Tutorials
    Attention! In the formulas as a delimiter I use a semicolon (; ) if you using my formula, then perhaps you need to use a comma (,)
    Also for a decimal number I use a comma (,) you may need to use point (.) instead of

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •