+ Reply to Thread
Results 1 to 13 of 13

Need help in finding sum acording to unique values in diff column

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Need help in finding sum acording to unique values in diff column

    Hello!!

    thanks for checking into this.

    i have two columns A & B with similar values

    column A column B

    111 23
    111 23
    111 23
    111 23
    121 33
    121 33
    121 33
    151 55
    151 55

    i need the sum output of column B in the following format in a cell

    111 23
    121 33
    151 55
    sum=23+33+55

    thanks in advance

    Gokz

  2. #2
    Registered User
    Join Date
    09-02-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Need help in finding sum acording to unique values in diff column

    hi,

    is removing duplicates an option?
    Regards,
    Hyperdude

  3. #3
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: Need help in finding sum acording to unique values in diff column

    not actually...because there are other columns related to it.

  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,939

    Re: Need help in finding sum acording to unique values in diff column

    assuming you're data is in A and B, use this in C2, copied down...

    =IF(A2=A3,"",B2+SUM($D$1:D1))
    or
    =IF(COUNTIF(A1:$A$9,A1)>1,"",B2+SUM($D$1:D1))
    It will give you a running total of unique values from B
    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
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    Re: Need help in finding sum acording to unique values in diff column

    How's about something simple...
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: Need help in finding sum acording to unique values in diff column

    Hii FDibbins,

    i dint understand the use of column D.

    if you dont mind..can you explain

    thanks

    Gokz

  7. #7
    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,939

    Re: Need help in finding sum acording to unique values in diff column

    I used D for the formula

  8. #8
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: Need help in finding sum acording to unique values in diff column

    @steve

    thanks

    but due to thousands of entries..i cannot use a pivot table.


    Gokz

  9. #9
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: Need help in finding sum acording to unique values in diff column

    @FDibbins

    It dint work as required. was generating sum even after my data in columns ended

    thanks

  10. #10
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: Need help in finding sum acording to unique values in diff column

    any other ideas???

  11. #11
    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,939

    Re: Need help in finding sum acording to unique values in diff column

    ok i just noticed that the sum() part of my calc isnt working. if an extra helper column is do-able for you, use...
    =IF(A1=A2,"",B1)
    or
    =IF(COUNTIF(A1:$A$9,A1)>1,"",B1)
    copied down, then just sum the column with the formula in it

  12. #12
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: Need help in finding sum acording to unique values in diff column

    Quote Originally Posted by FDibbins View Post
    ok i just noticed that the sum() part of my calc isnt working. if an extra helper column is do-able for you, use...
    =IF(A1=A2,"",B1)
    or
    =IF(COUNTIF(A1:$A$9,A1)>1,"",B1)
    copied down, then just sum the column with the formula in it
    @fDibbins

    sorry again..it doesnt work in the following case

    1
    1
    1
    2
    2
    1
    1
    3
    3
    3

    i.e. when a number repeats again after a diff number(like how 1 cmes aftr 2)

    thanks

    gokz

  13. #13
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Need help in finding sum acording to unique values in diff column

    Hi

    Sumproduct should acheive this;
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Quote Originally Posted by gokzee View Post
    Hello!!

    thanks for checking into this.

    i have two columns A & B with similar values

    column A column B

    111 23
    111 23
    111 23
    111 23
    121 33
    121 33
    121 33
    151 55
    151 55

    i need the sum output of column B in the following format in a cell

    111 23
    121 33
    151 55
    sum=23+33+55

    thanks in advance

    Gokz

+ 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