+ Reply to Thread
Results 1 to 2 of 2

VBA Subtotal question

  1. #1
    hooper
    Guest

    VBA Subtotal question

    The SUBTOTAL function in Excel will subtotal a list and show an outline
    control on the left of the screen. The outline control allows the user to
    change the amount of data shown in the sheet (data with subtotals, only
    subtotals or only grand total). Can this outline control be programmed via
    VBA? I would like to have a list that only shows the subtotals (without the
    source data displayed)? Will I have to switch to a Pivot Table to
    accomplish this task?

    Thanks



  2. #2
    Dave Peterson
    Guest

    Re: VBA Subtotal question

    Record a macro when you show/hide the data you want.

    You'll see code like:

    ActiveSheet.Outline.ShowLevels RowLevels:=1
    ActiveSheet.Outline.ShowLevels RowLevels:=2
    ActiveSheet.Outline.ShowLevels RowLevels:=3



    hooper wrote:
    >
    > The SUBTOTAL function in Excel will subtotal a list and show an outline
    > control on the left of the screen. The outline control allows the user to
    > change the amount of data shown in the sheet (data with subtotals, only
    > subtotals or only grand total). Can this outline control be programmed via
    > VBA? I would like to have a list that only shows the subtotals (without the
    > source data displayed)? Will I have to switch to a Pivot Table to
    > accomplish this task?
    >
    > Thanks


    --

    Dave Peterson

+ 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