Autosum
Location on ribbon: Tab DVD Addin → Group Formula
Command ID: btnAutosum
What it does
This command writes SUBTOTAL(9,…) formulas into a data column using a key column as the grouping marker. The add-in walks down the key column; every time a new key appears, it writes a formula into the same-row data cell that sums all values between the previous key and this one.
It is the quickest way to build section totals in a multi-item BoQ: the work-package column acts as the key, the quantity column as the data, and each package gets its own subtotal row without dragging formulas by hand.
How to use
- Prepare a table with one key column (package code, work item, floor number…) and one data column to sum.
- Go to tab DVD Addin → group Formula → click Autosum.
- The tool window opens on the Autosum tab (the Calculate tab group, alongside Fill Results and Direct Ref).
- In Reference column, pick the key column range on the sheet.
- In Data column to sum, pick the range of the column to be added up (same number of rows as the key column).
- Click Create SUBTOTAL. The formulas are written directly into the data cells sitting on each new-key row.
Example
Structural works quantity table:
| A (Package) | B (Detail) | C (Quantity) | |
|---|---|---|---|
| 5 | FOUNDATION | (SUBTOTAL of C6:C8) | |
| 6 | Blinding concrete | 12.4 | |
| 7 | Footing concrete | 86.5 | |
| 8 | Footing formwork | 210.0 | |
| 9 | SUPERSTRUCTURE | (SUBTOTAL of C10:C12) | |
| 10 | Level 1 columns | 34.2 |
Set Reference column = A5:A12, Data column to sum = C5:C12, then click Create SUBTOTAL: cells C5 and C9 receive SUBTOTAL(9,…) formulas covering exactly the detail rows of their own package.
Notes
- Both ranges must have the same number of rows and be aligned; an offset produces formulas that sum the wrong block.
- Formulas are created only on rows where a new key appears; the detail rows underneath are left untouched.
SUBTOTAL(9,…)skips filtered-out rows and does not double-count nested SUBTOTALs — exactly what a section total should do.- Existing content in the target data cells is overwritten; save the file before running it on a populated table.
- The tool window is modeless, so you can change the selection and run it again for another table without reopening.
Related
- Fill Results — sibling tab that appends computed results to description cells as "text = result".
- Direct Ref — sibling tab that writes cross-table reference formulas keyed on a shared column.
- Rounding Func — wrap the new formulas in ROUND to fix decimals for submission.