Deleting rows that have been Group'ed in VBA

Posted on 2012-08-21
Last Modified: 2012-08-27
Hello - Lets say you load up rows on a worksheet (from a table in a database), separating them by a given category into 3 separate sections, .Group those 3 sections, then .Outline and collapse those 3 sections.

(That's 3 separate single-level sections, not a 2-level hierarchy with 3 base-level sets)

Then you need to clear all this out to reload a different set of rows (the user wants to see rows from a different parent ID)

Do you have to .Ungroup each section before .Delete'ing the rows? (there are elements in & around these 3 sections, with named ranges, so I can't just clear the whole worksheet)

Question by:mlagrange
    LVL 8

    Expert Comment

    by:Elton Pascua
    Would you consider a Pivot Table option?

    Accepted Solution

    Well, I resorted to Ungrouping each section, then coming back and deleting the rows

    Thanks for your response

    Author Closing Comment

    I stumbled upon the solution...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I've recently been in need of an Excel macro that could add a letter before the text on multiple cells in an Excel document. My English is as it is, so I will try explain what it does diffrently. If you have an excel document with 2000 rows an…
    Introduction This Article is a follow-up to my Mappit! Addin Article (, it was inspired by an email posting I made to EUSPRIG (, I will briefly cover: 1) An overvie…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
    This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now