+ Reply to Thread
Results 1 to 6 of 6

Sum group of values then collapse?

  1. #1
    Registered User
    Join Date
    05-08-2017
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    81

    Question Sum group of values then collapse?

    Hi all,

    Not sure if this will require a macro or not, but will go with functions first.

    What I'm looking to do is calculate the amounts in column F, produce the sum in column G, and most importantly, have the sums only based on a group of same values in either column A or column B (either is fine). Then to have the groups collapsed into a single row showing the total in column G, and keeping everything else intact. I was thinking using if statements comparing the values in A or B would work, but then couldn't figure a way to handle the summing part in the manner described.

    I've attached a workbook that shows the original table, what the calculation would like (for illustration purpose only) and the final outcome.

    Is there a way to do this? Thanks for any input!
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Sum group of values then collapse?

    Hi. Before we get going on this one...

    Is your forum profile showing the Excel PRODUCT that you need this request to work with?

    The best solutions often rely on knowing WHICH Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date. If you aren't sure, in Excel go to File/Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent Excel PRODUCTS are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the Version number in your profile (e.g. MS365 (PC) Version 2211). The version number is in the About Excel section further down the Account page.

    Cheers,

    Glenn.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    05-08-2017
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    81

    Re: Sum group of values then collapse?

    Hi Glenn,

    I have: Microsoft Excel 2016, as part of the Microsoft Office Professional Plus 2016 suite. My forum profile version says "MS-Off Ver: 2016", so hope this is consistent (unless it's showing something else lol)?

    This is on Windows 10 Enterprise. Don't have either of the three most recent Excel products unfortunately!

    Thanks.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Sum group of values then collapse?

    try Power Query (Get&Transform)

    id name unused unused2 unused3 count Sum_Count
    455387
    apple
    40354
    Enter
    33
    473
    422727
    mango
    39034
    Enter
    18
    18
    251700
    cherry
    40598
    Enter
    578
    819

  5. #5
    Registered User
    Join Date
    05-08-2017
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    81

    Re: Sum group of values then collapse?

    Haven't used PQ before, will take some learning, but thanks for pointing to it!

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum group of values then collapse?


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Group, Collapse, Uncollapse, Ungroup
    By plans in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2016, 05:45 PM
  2. Protect worksheet but allow group expanding and collapse
    By chrisjd2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2016, 12:33 PM
  3. Group cells for expand and collapse
    By EXLent in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-13-2016, 06:45 PM
  4. Buttons Disappear when I collapse group
    By The Phoenix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2015, 10:46 AM
  5. Macro button to xxpand AND collapse Group (Outline)
    By dchubbock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2012, 07:34 PM
  6. Excel 2007 : Graph with Group Collapse Rows
    By Jerseynjphillypa in forum Excel General
    Replies: 0
    Last Post: 10-20-2011, 12:48 PM
  7. Unable to collapse a group
    By Meli602 in forum Excel General
    Replies: 1
    Last Post: 12-19-2008, 01:21 PM

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