+ Reply to Thread
Results 1 to 3 of 3

Create Sub Totals and Sum Total

  1. #1
    Registered User
    Join Date
    06-26-2009
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    74

    Create Sub Totals and Sum Total

    Hi all

    Attached is an example of the workbook I am looking for

    What I have created so far :


    A macro will take the sheet "Data" and split the info across into new separate worksheets labelled "SIM","MOR","RED","CAR","EMB"

    The split worksheets contain the same info as "Data" however the column for "Total Arrears" is sorted as descending and the moment values become negative, there is a 5 row gap to seperate the Positive amounts and Negative amounts in a descending order

    What needs to be completed:

    I need to create Sub Totals in columns E:K for both the negative and Postive balances (and Label them as "Sub - Total" in column D) as well as have them represented as a percentage, and then after that have a grand total value represented at the bottom

    I have attached examples of what the final product should look like for each worksheet (they are labelled in blue)

    The problem I have is that I am unsure of how to use VBA to recognise where to put the amounts for Sub Totals. I would assume it would use a .End.xlUp.Row and some kind of Offset, but I don'r even know where to begin

    The "Data" sheet has a button that runs the macro to split the data into worksheets, but the worksheets SIM/MOR/RED/CAR/EMB must be deleted first since there cannot be duplicate sheets (which is why there is also a button to delete those sheets)

    Help with this matter is appreciated

    Regards
    Attached Files Attached Files
    Last edited by georgeanaprop; 01-28-2010 at 02:03 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Create Sub Totals and Sum Total

    Hi

    Hopefully this will get you started. It doesn't do the column width, or the borders - got to leave you something to add.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    06-26-2009
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Create Sub Totals and Sum Total

    Wow Thanks

    That is much cleaner than what I have. Both seem to work though, except yours is tons more efficient!

    Here is my code that I got working:

    SOLVED!
    HTML Code: 

+ 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