mergecells
Merge cells in a rectangular range into a single cell.
Syntax
Section titled “Syntax”mergecells(cr1, cr2, ...)mergecells(cr1, ..., 'center')Description
Section titled “Description”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.
Examples
Section titled “Examples”mergecells(A1:D1)mergecells(A1:D1, 'center')See also
Section titled “See also”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.