Skip to content

mergecells

Merge cells in a rectangular range into a single cell.

mergecells(cr1, cr2, ...)
mergecells(cr1, ..., 'center')

Combines all cells in the given range(s) into one merged cell. The value of the top-left cell is preserved; other cells’ values are discarded. The optional trailing string 'center' centers the resulting content.

mergecells(A1:D1)
mergecells(A1:D1, 'center')
  • mergevert — Merge each column of a range into a single vertical cell.
  • mergehorz — Merge each row of a range into a single horizontal cell.
  • dissociate — Reverse a cell merge.