+ Reply to Thread
Results 1 to 4 of 4

Thread: adding values with unique identifiers

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    4

    adding values with unique identifiers

    Hi guys,

    I'm trying to do the following. I can't seem to describe it in plain English, that's why I can't find a solution with Google. So here goes:

    Suppose you have the following data:
    1 105,45
    1 34,23
    1 123,40
    1 90,50
    1 234,04
    1 12,40
    2 123,00
    3 87,45
    3 9,65
    3 32,60
    4 7,40
    4 0,65
    5 65,24
    6 456,43
    7 234,06
    8 24,68
    8 65,23
    8 12,40

    I want to add the values of the second column together for each unique identifier, so the result would be:
    1 600,02
    2 123,00
    3 129,70
    4 8,05
    5 65,24
    6 456,43
    7 234,06
    8 102,31

    Any ideas how I can do this for large data sets?

    EDIT: for clarity, first numbers of each row are in one column, the rest of the numbers in each row in the second column.
    Last edited by AntiC; 01-27-2012 at 09:53 AM.

  2. #2
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,296

    Re: adding values with unique identifiers

    Hi and welcome to the forum.

    You can do this using SUMIF

    Column A= your numbers(1,2,3,4,5....)

    Column B= Your values.

    Then in C1, try this.

    =SUMIF($A$1:$A$10;1;$B$1:$B$10)

    If does not work, change the semicolon with gomma, in the formula.

    Hope to helps you.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  3. #3
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,617

    Re: adding values with unique identifiers

    You can quickly create a Pivot Table to get the unique values and sum all at once,

    While in your table, go to Insert|Pivot Table, enter a location to put your table, or if in another sheet, just click ok.

    Then drag the unique identifier header from top of pane to the Row Label area, and the other column header to the Summation data area.

    Pivot Table Tutorial: http://www.contextures.com/CreatePivotTable.html
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  4. #4
    Registered User
    Join Date
    01-27-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: adding values with unique identifiers

    Sigh, must be Friday. So full solution will be copy first column to a new column > remove duplicates > sumif like you described. Thanks Fotis 1991!

    Edit: and thanks to NBVC too!

+ 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.2.0