+ Reply to Thread
Results 1 to 8 of 8

Macro - Loop through rows when change total up total row

  1. #1
    Registered User
    Join Date
    01-13-2021
    Location
    Wisconsin, USA
    MS-Off Ver
    10
    Posts
    9

    Macro - Loop through rows when change total up total row

    I'm not sure what I'm exactly looking for or how to search for it. Basically i have a macro which is looking at a column and splitting out by sheets for that column. This macro also sums a column after it is split out. But now I want to add another layer where it still splits by the specific column and still does the sum of all columns after split but I want to add to another sheet that I'm copying over that has totals (H) by funding (f). So for example, here is the split sheet

    Column H | Column T
    123456 | 0.00
    123456 | 0.00
    123456 | 0.00
    123456 | 5.23
    123456 | 6.45
    123344 | 0.00
    123344 | 3.00
    123344 | 5.00
    123344 | 0.00
    123355 | 1.00
    123355 | 3.00
    123355 | 4.10

    So basically on this new sheet
    it would have these values

    Funding (A) | Total (B) | Description (C)
    123456 | 11.68 | March21 totals
    123344 | 8.00 | March21 totals
    123355 | 8.10 | March21 totals

    Not sure what to call this. I would like to include in the main macro.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Macro - Loop through rows when change total up total row

    No sample file...So can only guess...Also, no idea where the description comes from...sample file upload will be ideal...
    Assumes Headers in Sheet1
    Please Login or Register  to view this content.
    Last edited by Sintek; 05-04-2021 at 07:29 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    01-13-2021
    Location
    Wisconsin, USA
    MS-Off Ver
    10
    Posts
    9

    Re: Macro - Loop through rows when change total up total row

    Quote Originally Posted by sintek View Post
    No sample file...So can only guess...Also, no idea where the description comes from...sample file upload will be ideal...
    Assumes Headers in Sheet1
    Please Login or Register  to view this content.
    I can do a sample file. Also would you want me to share what I have so far for my macro/VBA?

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Macro - Loop through rows when change total up total row

    Ideally...Supply sample file that is exact same setup as actual file...With a before | after result and explain in detail what it is you are trying to achieve...
    Also...No need to quote entire posts...Just clutters the thread...

  5. #5
    Registered User
    Join Date
    01-13-2021
    Location
    Wisconsin, USA
    MS-Off Ver
    10
    Posts
    9

    Re: Macro - Loop through rows when change total up total row

    I have attached the sample file.

    And here is my VBA

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Macro - Loop through rows when change total up total row

    And drum roll...What is it you want to achieve...Explanation...
    Also...Your code contains Userform and Textbox script and the file is void of this...
    Sample file has no expected result...In order for anyone to assist, we will need some kind of idea of your requirement...
    Last edited by Sintek; 05-04-2021 at 12:52 PM.

  7. #7
    Registered User
    Join Date
    01-13-2021
    Location
    Wisconsin, USA
    MS-Off Ver
    10
    Posts
    9

    Re: Macro - Loop through rows when change total up total row

    Basically I would like the macro to do the following:

    From the "By Transaction" tab, add the Funding along with the subtotal to "Funding" tab - Funding # would go under column B and Subtotal would go under column C. I don't want to just copy all the values in funding and all the values in total to the "Funding" sheet. I want it to be subtotalled so the first row would be funding #123456 with the whole total for that, then the next Funding # would go in the next row with the total for those and so on. The description will come from the "Confirmation Form" tab in cell C10.

    Attached is the sample with the Funding Sheet filled in correctly from the values on "By Transaction" and "Confirmation Form"
    Attached Files Attached Files

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Macro - Loop through rows when change total up total row

    Thank you for your clear explanation...
    Please Login or Register  to view this content.

+ 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] Total | Sub Total Headings during loop via array
    By Sintek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-02-2019, 02:29 PM
  2. [SOLVED] Dont want total Column, just few rows will change with this VBA
    By rajeshn_in in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2017, 05:47 AM
  3. Replies: 1
    Last Post: 05-13-2015, 12:52 PM
  4. Macro to solve total, subtotal and grand total automatically...
    By blorban in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2015, 05:25 PM
  5. [SOLVED] Macro to Total a Column Up 15 cells and place total in cell of last row
    By guitarsweety in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-20-2014, 05:25 PM
  6. [SOLVED] need vba help to sum the overall total ,>2 days total & change cell values
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-17-2014, 01:55 PM
  7. [SOLVED] macro code to loop through all worksheets and divide each rows to get % of grand total
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-05-2013, 11:06 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