+ Reply to Thread
Results 1 to 2 of 2

Excel Macro Group By and SUM

  1. #1
    Registered User
    Join Date
    02-22-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    3

    Excel Macro Group By and SUM

    (same post as my last one..its URGANT)
    Hi, I need help to create macro with GROUP BY and SUM for below spreedsheet... (Admin, not using Pivot table)

    DATA IN Sheet_1

    ID Date Price
    0001456 3/01/2008 $1,23.96
    0001456 3/01/2008 $651.47
    0001456 3/01/2008 $731.46
    0001457 3/01/2008 $55.00
    0001457 3/01/2008 $6.00
    0001458 3/01/2008 $43.92
    0001458 3/01/2008 $1,892.45
    0001458 3/01/2008 $6,852.33
    0001459 3/01/2008 $7,098.00
    0001459 3/01/2008 $8,408.10
    00014510 4/01/2008 $9,766.10
    00014511 4/01/2008 $780.64
    00014511 4/01/2008 $7,251.62

    Output Result I am looking for in Sheet_2:

    ID Date Price
    0001456 3/01/2008 $1,382.93
    0001457 3/01/2008 $61.00
    0001458 3/01/2008 $8,788.70
    0001459 3/01/2008 $15,506.10
    00014510 4/01/2008 $9,766.10
    00014511 4/01/2008 $8,032.26

    Condition is if ID and DATE (group by) are queals then SUM of price?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    re: Excel Macro Group By and SUM

    This can be done by macros, but standard low power formulas can do it, too. you just need a "key" in your existing data to draw against.

    This sample sheet shows how it is done with your data.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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