+ Reply to Thread
Results 1 to 8 of 8

How to sum by group and place in specif order?

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    How to sum by group and place in specif order?

    Hello all

    I have a worksheet (sheet1) where the user will have options to choose from and input the quantity in column C. What the macro should do, is create a worksheet (got that working) and sum the total of the option chosen. I summed all the values in the new worksheet but after searching Google I can’t seem to find a way to group and sum those options. Once that is done, I still need those results to be separated by type (columns L:M)and be put in a specific order by option (column N:O).

    This is what I have so far:

    Please Login or Register  to view this content.
    *Please note columns L:O will be hidden
    Attached Files Attached Files
    Last edited by AccountingJ; 12-25-2017 at 07:28 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: How to sum by group and place in specif order?

    If you accept an extra column D for type a Pivot Table could be used.
    See file attached and comment
    Attached Files Attached Files
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to sum by group and place in specif order?

    Although a pivot table works great,it won't work with what I need. I have other code before this step and have a few things to add after it as well so I would like for it to be a continuation of VBA running.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: How to sum by group and place in specif order?

    See next code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to sum by group and place in specif order?

    This works great, I don't suppose you can explain your code? I can kind of follow it but not 100% or even 50% lol.

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: How to sum by group and place in specif order?

    It is using Dictionnary inside a Dictionnary
    There is 3 steps:
    Dictionnary structure preparation using data from columns L to O
    Dictionnary data recording, gathering data from columns B to C
    Display
    By the way there is a slight ajustment to do: note the dot added when using .Range(Ref3)
    See next code
    Please Login or Register  to view this content.
    Last edited by PCI; 12-26-2017 at 04:52 PM. Reason: Typo

  7. #7
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to sum by group and place in specif order?

    I appreciate your time for the work and explanation.

    Thanks again

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: How to sum by group and place in specif order?

    You're welcome

+ 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. Group and Sort and Place in new columns and rows
    By kgw in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-07-2015, 03:28 PM
  2. Replies: 6
    Last Post: 01-14-2014, 11:48 PM
  3. Replies: 0
    Last Post: 02-04-2013, 02:35 AM
  4. Is there a way to place a row in numeric/alpheberical order?
    By Krystle in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-31-2006, 08:15 PM
  5. How do I place items in alphabetical order in a column and keep da
    By Angela33 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  6. How do I place items in alphabetical order in a column and keep da
    By Angela33 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  7. [SOLVED] How do I place items in alphabetical order in a column and keep da
    By Angela33 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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