Skip to content

Merge rows by key

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

Command ID: btnMergeRows

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 collapses all rows that share the same value in the first column (the key column) into a single row. In the remaining columns, numeric cells are added together as a formula such as =12.5+8.4+3 — keeping every term visible so quantities stay auditable — while text cells are concatenated on separate lines.

It suits detailed quantity take-offs that must be summarised per work code, or a material log with many deliveries per month that needs grouping by material name.

How to use

  1. Click DVD Addin → Cells and Rows → Merge rows by key.
  2. Excel's range picker appears with the prompt "Please select a range". Drag over the data block (exclude the header row) and click OK.
  3. The selection must be at least 2 columns × 2 rows; column 1 is always treated as the key column.
  4. The command reads the whole block, clears the selected range and writes the result back from the first row: one row per key, in first-appearance order.
  5. The status bar reports "Aggregated 40 rows into 12 groups".

Example

A concrete take-off measured per member, to be summarised per work code:

BeforeAfter
CodeQuantityLocationCodeQuantityLocation
AF.1111012.5Footing M1AF.11110=12.5+8.4 → 20.9Footing M1
Footing M2
AF.111108.4Footing M2AF.12220=6.2 → 6.2Column C1
AF.122206.2Column C1

Notes

  • The selected range is cleared and overwritten — Ctrl+Z cannot undo it, so back up the sheet or run the command on a copy of the block.
  • Numeric cells become an addition formula (=12.5+8.4); copy and Paste Special → Values if you need static numbers.
  • Text cells are joined with line breaks — turn Wrap Text on to see the full content.
  • Rows left over below the collapsed result are blanked, not deleted; remove them manually if needed.
  • Only column 1 can act as the key; move the key column to the front of the selection if it sits elsewhere.
  • Holding ESC during the scan stops the command before the clear-and-write step, leaving the original data intact.
  • Merge similar — merges cells visually without aggregating numbers.
  • Copy/Paste visible — transfers values between two tables using a key column.
  • Auto group — rebuild the outline levels once the table is summarised.

Released under DVDAddin License.