Skip to content

Auto group

Location on ribbon: Tab DVD Addin → Group Cells and Rows → Menu Merge cells

Command ID: btnAutoGroup

License required

This command needs a valid DVDAddin account (Standard or PRO). It is fully available during the trial period.

What it does

The command reads a column of outline numbers (1, 1.1, 1.1.1…) or plain integer levels (1, 2, 3) and builds Excel's row Grouping (Outline) to match, optionally indenting the description column so the tree structure is visible at a glance.

It pays off on bills of quantities organised by section — substructure / superstructure / finishes — or on multi-level programme tables: as long as the numbering column is consistent, you get +/- outline buttons to collapse each section.

How to use

  1. Click DVD Addin → Cells and Rows → Merge cells → Auto group. The Auto group rows window opens.
  2. Based area — type the address or click the ⤴ button to pick the column holding the outline numbers (e.g. A5:A120). It must be 1 column × N rows.
  3. Target cell (optional) — the first cell of the column to indent (usually the "Description" column). Leave blank to skip indenting.
  4. Max level — the deepest level that will be grouped.
  5. Tab indent — how many indent steps are added per level.
  6. Untick Create groups if you only want to apply the indent and remove existing groups.
  7. Click Apply. The outline +/- buttons appear in the left margin of the sheet.

Example

The Package 03 bill of quantities numbers column A as 1, 1.1, 1.1.1, 1.1.2, 1.2, 2… and holds the work description in column C.

Set Based area = A6:A250, Target cell = C6, Max level = 4, Tab indent = 1, keep Create groups ticked and click Apply. Row 1.1.1 now sits inside the group of 1.1, which sits inside 1; the descriptions in column C are indented by level; pressing outline button 2 collapses the sheet to section level for a summary printout.

Notes

  • The level is derived from the value: a dotted string (1.1.1) gives level = number of dots + 1; a plain number (3) is used as the level itself. Inconsistent numbering produces an incorrect tree.
  • Based area must be 1 column × N rows. A 1 row × N columns range reports "Column-grouping mode is not ported yet"; any other shape reports an invalid range.
  • A malformed address (missing sheet, bad syntax) raises "Invalid 'Based area' range".
  • The command overwrites the existing grouping of those rows and cannot be undone with Ctrl+Z.
  • Holding ESC while the values are being read aborts the whole operation and leaves the sheet untouched.

Released under DVDAddin License.