+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : 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 10:53 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    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.

    -This is my Greek whisper to Europe.

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

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

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

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

  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.6.0 RC 1