How can I resize a level 2 grouping in a row-based outline structure.

Copper Contributor

PC/Windows 10
Microsoft 365
Version 2403 Build 16.0.17425.20176) 32-bit

 

Summary: I need to reset a level 2 grouping in a row-based outline structure to match a new size (i.e. adjust the number of lines within a sub-group directly).

 

Issue: I know how to set up outline levels, but the only way I know of to readjust the number of rows in a level 2 grouping is to delete the entire outline structure and recreate my outline groupings from scratch.

 

Hoped for Result: I would like to find a way to simply select and adjust the number of rows in any particular existing level 2 sub-grouping directly (rather than recreate the entire outline structure).

===========================================

Description: I have a simple spreadsheet in Excel where I keep weekly paycheck figures for my wife. I use a 2-level outline to divide the paycheck rows into Year (Level 1) and Month (Level 2) to make things easy to work with.

 

Each year, I copy the prior year's outline into a new tab, empty the existing data, and use the now empty sheet as my template for the new year's work. Of course, the number of paycheck weeks within each month changes with the year.  But I find that as I create the right number of weeks within each month (adding and deleting lines to match the paydates), the Month (level 2) grouping 'edges' get slightly off, that is, the beginning and end of that Level 2 group become off by a row of two as I add/delete lines within that particular group. That many times propagates down the level 2 outline, altering the boundaries for other months in ways both weird and wonderful.  I would like to reset any particular Month (level 2) grouping directly to match the new actual month groupings without affecting other level 2 groupings.  Can you help me?

1 Reply

@Sid_Broach 

It seems like you are looking for a way to adjust the size of a Level 2 grouping in a row-based outline structure without having to recreate the entire outline structure.

While Excel does not offer a direct way to resize individual groupings within an outline, there are a few workarounds you can try:

  1. Manually Adjust Row Heights:
    • You can manually adjust the row heights to match the desired grouping. Select the rows you want to include in the Level 2 grouping, right-click, choose "Row Height", and enter the desired height. This method may be tedious if you have many rows to adjust.
  2. Use a Macro:
    • You can create a macro to automate the process of resizing the row heights for specific Level 2 groupings. The macro would select the rows for the desired grouping and adjust their height accordingly. Here's a basic example of what the macro might look like:

Vba code is untested, please backup your file frst.

Sub ResizeLevel2Grouping()
    ' Select the range of cells for the Level 2 grouping
    Dim rng As Range
    Set rng = Range("A1:A10") ' Adjust the range as needed
    
    ' Set the desired row height
    Dim rowHeight As Double
    rowHeight = 25 ' Adjust the row height as needed
    
    ' Resize the row heights
    rng.RowHeight = rowHeight
End Sub

You can customize this macro to select the specific range of cells for your Level 2 grouping and set the desired row height.

3. Use Formulas for Dynamic Row Heights:

    • You can use formulas to dynamically adjust the row heights based on the number of rows in each grouping. For example, you could use a formula in the row height property of each row to calculate the height based on the number of rows in the grouping.

These workarounds may require some manual effort or scripting, but they should allow you to adjust the size of individual Level 2 groupings without affecting the rest of the outline structure. If you were comfortable with VBA scripting, the macro approach would likely be the most efficient solution. The text, steps and code were created with the help of AI.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

Was the answer useful? Mark as best response and Like it!

This will help all forum participants.