Results 1 to 20 of 20

Need a macro to sum or subtotal ranges of varying lengths in a column

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Need a macro to sum or subtotal ranges of varying lengths in a column

    I've reached a point in this macro where I'm stuck with NO clue how to achieve this, or even whether it can be done. In the Before sheet below, I need to bold the cells in H & I if the word "Total" is in G. I could probably manage that part, but here's the weird part: I need to add a formula to H & I of each row with "Total" in G to sum the numbers above it, from the previous total down to the current total. But there's no telling how long each range might be on a given report; from 1 row up to 8 rows.

    THEN, in the second row below the end of columns H & I, I need to put a formula totalling all of the preceding Totals

    I wonder if there might be a way to tell it to put a formula in H by each cell that has "Total" in G, with the formula summing or subtotalling everything from the cell in H that has data in F to the cell just above the "Total". Any ideas?

    I'm trying to attach a file; I hope it works!

    Thanks!

    Jenny
    Attached Files Attached Files
    Last edited by zookeepertx; 05-01-2014 at 11:56 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Generic sort macro for varying lengths
    By s0o0y in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2013, 04:59 PM
  2. VBA to Subtotal in Varying Rows and Ranges
    By snelson0713 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2011, 12:46 PM
  3. Replies: 2
    Last Post: 09-20-2010, 05:55 AM
  4. Apply Macro to varying row lengths
    By izza56 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-08-2006, 10:36 AM
  5. Fill down formula using VBA to varying column lengths
    By Lee Jeffery in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 01-28-2005, 08:40 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