+ Reply to Thread
Results 1 to 6 of 6

Grouping Data and Summing numbers by row

Hybrid View

bluegreen Grouping Data and Summing... 10-23-2010, 06:40 AM
DonkeyOte Re: Grouping Data and Summing... 10-23-2010, 06:50 AM
bluegreen Re: Grouping Data and Summing... 10-25-2010, 12:22 AM
gigi2910 Re: Grouping Data and Summing... 10-23-2010, 07:02 AM
JapanDave Re: Grouping Data and Summing... 10-23-2010, 07:28 AM
Marcol Re: Grouping Data and Summing... 10-23-2010, 08:06 AM
  1. #1
    Registered User
    Join Date
    10-23-2010
    Location
    texas
    MS-Off Ver
    Excel 2008
    Posts
    2

    Grouping Data and Summing numbers by row

    Ok, I'm not very tech savvy but know this should be doable in Excel.

    To simplify say I have 5 rows and 3 columns below:

    A | 3 | 5
    A | 2 | 7
    B | 8 | 2
    B | 1 | 3
    B | 3 | 9

    I want to group the rows by the first column at the same time sum columns 2 and 3 so the above would go to ...

    A | 5 | 12
    B | 12 | 14

    How can I do this ... do I need a macro?
    (BTW, the first column is a domain name, ex. yahoo.com)

    Thanks in advance

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Grouping Data and Summing numbers by row

    You could use a Pivot Table or you could apply a Subtotal (see Data Tab -> Subtotal) - at each change in Column A apply SUM to Columns B & C then use the Group Buttons (1,2 etc) to see the appropriate level.
    Note: both options require your data table has a header row.

  3. #3
    Registered User
    Join Date
    10-23-2010
    Location
    texas
    MS-Off Ver
    Excel 2008
    Posts
    2

    Re: Grouping Data and Summing numbers by row

    Quote Originally Posted by DonkeyOte View Post
    You could use a Pivot Table or you could apply a Subtotal (see Data Tab -> Subtotal) - at each change in Column A apply SUM to Columns B & C then use the Group Buttons (1,2 etc) to see the appropriate level.
    Note: both options require your data table has a header row.
    Thanks it worked

  4. #4
    Registered User
    Join Date
    10-23-2010
    Location
    egypt
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Grouping Data and Summing numbers by row

    I need to sum a time series data for a number of countries while considering the following
    - each observation has a start date in cell B
    - Each observation has an end date in Cell C
    - data start from 1990 in cell D to 2009 in cell W


    so what is the formula I can use if I want to sum for example the data for country x using start date in B and end date in C (from the range of cells from D to W)

  5. #5
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Grouping Data and Summing numbers by row

    @gigi2910, post your own thread. Your questions are off topic in this thread.

    bluegreen, can you post a dummy file?

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grouping Data and Summing numbers by row

    Assuming your data is sorted,or can be sorted, on Column A and begins in Row2

    In E2
    =IF(A2<>A1,A2,"")
    Drag/Fill Down

    In F2
    =IF($A2<>$A1,SUMIF($A2:$A100,$A2,B$2:B$100),"")
    Drag Across to G2 then Down as required
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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