+ Reply to Thread
Results 1 to 2 of 2

VBA Macro for new row subtotals with hidden rows and separate conditonal subtotal

Hybrid View

  1. #1
    Registered User
    Join Date
    02-03-2017
    Location
    SE Texas
    MS-Off Ver
    2013
    Posts
    98

    VBA Macro for new row subtotals with hidden rows and separate conditonal subtotal

    First, I am using Windows 7 with Excel 2013. I tried to illustrate my problem to, hopefully, clarify the challenge at hand. This is the very first such posting on any tech website, so please pardon any inadvertent noncompliance with protocols. My coding skills are are very much outdated, but I am getting much better at reading VBA coding and from time-to-time surprise myself with being able to make some needed changes – this is not to say I am able to do any complex and, perhaps, even moderate coding form scratch, short of some Macro recordings I’ve done as a starting point.

    The first image (hopefully attached and visible) is basically a sanitized and simplified portion of one worksheet in a much larger project workbook. I have agonized over for several days over trying to piece together coding I have found from various sources. Regrettably, I have exhausted all options and skills. I got as far as I did by searching sites like this one, snipping code and pasting together coding. for this project, I am finding bits and pieces of code but strike out when trying to combine certain functional parts of any fully functional coding.

    The basic problem is illustrated in the two images. In the first worksheet image, I am searching for Macro coding (must be macro coding or firmly embedded formulas that will permit inserting new rows for subtotals after each change in “Program” (in column A). (In the real and much larger spreadsheet, there will be need to also subtotal by “Aspect” within each “Program”, but I hope to learn from any help given here and extend it.) Each Subtotal counts apparent none blank cells and must ignore simple empty cells that may have a “space” or formula hiding somewhere. (I tried COUNTA and numerous UDFs for the subtotal with mixed success.. or I should say mixed failure.) The first image (“Existing Filtered List) is of a worksheet after filtering and before any desired counting of cells. (I simulated the line numbers to show there are hidden rows.)

    What I have failed to accomplish is what is illustrated (also simulated) in the second image (“Desired Result”). If this was a once only exercise I could do this fairly easily; however, but this will be for an audience that has next to no Excel skills ... so I need a macro (one that I hope to assign to a Forms Control Button somewhere at the top of the worksheet - button not shown).
    After each “Program” is subtotaled and, of course, a final or grand “TOTAL” is needed. The length of the unfilitered list may be several hundred lines long and contain over a dozen different “Programs” but each Program has only six different “Aspects” (in column B). Here is where a twist comes in... the last line in the “Desired Results” image shows another total for “CRITICAL ENDPOINTS” that shows one instance where the “N” (for “No”) in column E is highlighted with red fill and occurs on a Question that coincidentally has red fill (Interior Color = 255) in its cell containing a question number (here, its question number 2 in the SIL Program, worksheet Line 46 in the second image). Such occurrences require special attention, therefore, this conditional total is also required. I could paste the various coding I attempted but I am sure I’d be limited by space allowed for posting- besides it don’t work.
    Any guidance would be most appreciated! (Not sure if attachment will make it... if so, let me know and I'll try again!)
    Project Picture.docx

  2. #2
    Registered User
    Join Date
    02-03-2017
    Location
    SE Texas
    MS-Off Ver
    2013
    Posts
    98

    Re: VBA Macro for new row subtotals with hidden rows and separate conditonal subtotal

    I was told in a PM from a "retired solver" from this site who is now also in another forum that I won't get any takers. They didn't offer anything really helpful except to say the effort to acquire "street cred" by solving my issue isn't worth the effort.??? Any suggestions as to how I can simply my problem would be helpful!

    On another note, often when I search a different thread or browse previous questions (in vain to solve my problem) I seem to get logged off. What's up with that? Why is my session login so tenuous?

+ 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] Subtotals with HIDDEN rows AND columns given some criteria
    By jalo638 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 08-08-2014, 08:05 PM
  2. Copy subtotals without hidden rows
    By bfordmelson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2005, 04:15 PM
  3. [SOLVED] using SUBTOTAL() on rows that have been hidden
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  4. [SOLVED] using SUBTOTAL() on rows that have been hidden
    By doco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. using SUBTOTAL() on rows that have been hidden
    By doco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. using SUBTOTAL() on rows that have been hidden
    By doco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 12:05 AM
  7. using SUBTOTAL() on rows that have been hidden
    By doco in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2005, 10:05 PM

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