Skip to content

insertcells

Insert empty cells, shifting existing cells.

insertcells(cr)
insertcells(cr, direction)

Inserts new empty cells at the position of cr, shifting existing cells in the chosen direction. Direction is a string: 'right' (default) or 'down'. Doesn’t affect entire rows/columns — only the cell range.

insertcells(B2:B5, 'down') % shift down
insertcells(B2:B5, 'right') % shift right
  • deletecells — Delete cells, shifting remaining cells.
  • insertrows — Insert empty rows above the specified position.
  • insertcols — Insert empty columns at the specified position.