+ Reply to Thread
Results 1 to 10 of 10

Autosum Grouped Cells

  1. #1
    Registered User
    Join Date
    05-20-2015
    Location
    United States
    MS-Off Ver
    Microsoft Office 2013
    Posts
    36

    Autosum Grouped Cells

    Hello everyone,

    I have been trying to create a macro that inserts a space between different values (per below code), but now I also need the macro to autosum the values in cells K and L, within the grouped/ divided rows.

    Grouping code:
    Please Login or Register  to view this content.

    Below is my very poor attempt for the autosum:

    Please Login or Register  to view this content.
    How would I correct this code, and where would I insert it to make it work, or does that not matter? Thank you in advance for your assistance.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autosum Grouped Cells

    Does this help?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-20-2015
    Location
    United States
    MS-Off Ver
    Microsoft Office 2013
    Posts
    36

    Re: Autosum Grouped Cells

    Hello John, and thank you for the reply. This has helped, however there are still a couple problems. How would I make the macro print the outcome in column P? And is there a way to combine the amounts in column K and L? It looks like it is just doing the sum of Column K, and then the sum of column L. Thank you again for the help.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autosum Grouped Cells

    In Column P, do you want the sum of both Column K and L? Can you provide a sample showing a before and after sheet when the macro is run?

  5. #5
    Registered User
    Join Date
    05-20-2015
    Location
    United States
    MS-Off Ver
    Microsoft Office 2013
    Posts
    36

    Re: Autosum Grouped Cells

    Yes, in column P I would like the sum of K and L to be displayed. Below is the requested screenshots. Due to the nature of the report, I had to leave out heading and personal information.

    Excel SS.JPG




    Excel SS 2.JPG

    The second screenshot if after the macro is run.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autosum Grouped Cells

    In your screen shots which Columns are which (K,L and P). Posting a sample with the layout of what you want to happen does not need to include any confidential information. Just some dummy data to show the results.

  7. #7
    Registered User
    Join Date
    05-20-2015
    Location
    United States
    MS-Off Ver
    Microsoft Office 2013
    Posts
    36

    Re: Autosum Grouped Cells

    Alright, let's try these:

    Excel SS.JPG




    Excel SS 2.JPG

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autosum Grouped Cells

    Maybe:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-20-2015
    Location
    United States
    MS-Off Ver
    Microsoft Office 2013
    Posts
    36

    Re: Autosum Grouped Cells

    Alright, that worked great actually. Now the final issue I am running into is further grouping my lists. Currently it inserts a space between each of my separate people, based off of an ID in column A. Within each grouped person, there are separate purchases that need to be totaled and posted in column P. Below is a picture to help illustrate:

    excel SS 3.JPG

    So instead of totaling the entire selection, is there a way to further autosum within the group based on a value in column G? Thank you so much for your help, you've been great.
    Attached Images Attached Images
    Last edited by joshuarobbins; 11-24-2015 at 05:14 PM.

  10. #10
    Registered User
    Join Date
    05-20-2015
    Location
    United States
    MS-Off Ver
    Microsoft Office 2013
    Posts
    36

    Re: Autosum Grouped Cells

    And please disregard the two random screenshots below the main one. Those were previous screenshots I took and removed because they did not best illustrate what I was explaining. Looks like they stuck with the post in error.

+ 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] Autosum discount formula according the cells different from 0.00
    By momchil.vladov in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2014, 04:17 AM
  2. [SOLVED] probably an easy one- want to autosum column but some cells have #N/A
    By Dadof2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2014, 01:56 PM
  3. Autosum Percent of Complete Cells?
    By paburgess in forum Excel General
    Replies: 1
    Last Post: 06-11-2012, 01:35 PM
  4. VBA to lock cells is failing due when dealing with grouped cells
    By Bobkin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2012, 08:38 PM
  5. VBA for Autosum up on multiple cells
    By moonoo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2010, 02:43 AM
  6. Would like autosum figure to appear in selected cells
    By vinny1 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-23-2009, 07:12 AM
  7. use of grouped cells
    By Wouldsman in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-05-2007, 10:41 AM

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