To merge cells in LibreOffice Calc, select the adjacent cells, then choose Format > Merge and Unmerge Cells > Merge and Center Cells or Merge Cells. You can also use the merge button on the toolbar if it is visible. Before confirming, check the selected cells: merging changes the layout and can affect the contents of cells other than the upper-left one.
What merging cells does in Calc
Merging combines a rectangular group of neighboring cells into one larger cell. For example, selecting A1:C1 and merging creates one cell spanning three columns. Selecting A1:B2 instead creates one cell spanning two columns and two rows. The result behaves as one cell for typing and formatting, rather than as several independently editable cells.
This is mainly a layout tool. A common use is placing a report title over several columns, such as merging A1:D1 so a heading sits above a four-column table. It can also make a label span several columns in a form. It does not combine separate records into a new table structure, add numbers together, or make the selected values into a single formula result.
Keep the distinction between merging and centering in mind. Merge Cells combines the selected cells but does not specifically promise centered text. Merge and Center Cells combines them and centers the content horizontally. Choose the second option for a centered heading; choose the first if you want to set alignment separately.
How to merge cells step by step
- Open the sheet in Calc and select a continuous rectangular range. Drag across the cells, or click the first cell and Shift-click the last cell. You can also enter a range such as A1:D1 in the Name Box and press Enter.
- Open Format > Merge and Unmerge Cells.
- Choose Merge Cells or Merge and Center Cells, depending on the alignment you want.
- If Calc warns that some selected cells contain data, read the prompt before continuing. Choose the option that matches your goal, or cancel and copy the data to a safe location first.
- Enter or edit the content in the resulting merged cell. Apply borders, alignment, wrapping, number formatting, or other formatting as needed.
Depending on the Calc toolbar layout and version, a merge button may be available directly above the sheet. Hover over toolbar icons to read their tooltips; the button can provide the merge command without opening the Format menu. If you do not see it, the menu route remains available, and toolbar visibility or customization can vary.
Merge cells horizontally or vertically
The shape of the selection determines the shape of the merged cell. For a heading across columns, select a single row of cells, such as B2:E2. For a label down a column, select a single column, such as A2:A4. A selection covering multiple rows and columns creates one larger merged cell across the whole rectangle, not separate merges for each row.
That last detail matters for tables. If you select A1:C3 and merge, Calc makes one cell covering the entire three-by-three area. It does not make three horizontal merged cells. If you want a title row merged separately from the rows below, select only the title-row range, merge it, then work with other rows independently.
Selections should be contiguous and rectangular. A non-adjacent selection, such as holding Ctrl while selecting unrelated cells, is not a sensible merge range. If the command is unavailable or the result is not what you expected, select one clear rectangle and try again.
What happens to existing content
Merging deserves extra care when more than one selected cell has content. The upper-left cell is the anchor of the merged area, and Calc may show a confirmation prompt about the other cells. The exact choices and wording can depend on the situation and version. Read the dialog rather than assuming that every value will remain visible in the merged result.
For data you need to keep, the safest approach is to copy or move it elsewhere before merging. You can also cancel the merge, combine information deliberately in a separate cell, and then merge only after checking the result. A merge is not a reliable way to concatenate data: it does not automatically create a properly delimited list or preserve each value as an independent cell.
For example, suppose A1 contains North, B1 contains South, and C1 contains East. Merging A1:C1 is not a substitute for creating a heading that reads North, South, East. Put the desired heading into one cell explicitly, or leave the cells separate if each value is meaningful. Keep a copy of important source data before making structural changes.
Format a merged heading clearly
After merging, format the result so readers can tell what it labels. Select the merged cell and use Calc’s formatting controls to set horizontal and vertical alignment, font weight, background color, borders, and text wrapping. A title such as Quarterly Summary can be centered and bold, while a section label might be left-aligned to match the table below it.
Text that is longer than the available width may be clipped or displayed across neighboring empty cells, depending on the formatting and what is in those cells. Use wrapping or adjust the row height and column widths if the full text is not visible. Merging does not automatically size every row and column to suit the content, so inspect the sheet at normal viewing size and in print preview if it will be printed.
For a clear example, a report with columns A through D for Date, Product, Quantity, and Total could use a merged A1:D1 title, with the column labels kept in row 2 as four separate cells. This creates a visual heading without merging the actual labels or the records beneath them.
When merging is a poor choice
Merged cells can make a sheet harder to sort, filter, copy, fill, and maintain. A table works best when each row is one record, each column has one field, and each data cell remains separate. A merged cell inside the body of a table can create uneven row structures and make operations on a selected range confusing. Avoid merging cells in the records you expect to analyze.
- For sortable or filterable data: keep the data grid unmerged, with one header per column and one record per row.
- For repeated section labels: consider repeating the label in each relevant row, or use formatting and borders to show the grouping.
- For a centered title: merge only the title area, not the data columns below it. If you want to avoid merging, place the title in one cell and adjust the layout and alignment instead.
- For formulas and references: verify formulas after a merge. A merged range has one usable cell at its upper-left position; cells covered by the merge are no longer separate places to enter values.
In short, merging is usually appropriate for presentation, not for organizing source data. If a sheet will later be imported into another program or used for calculations, an unmerged rectangular table is generally more robust.
How to undo or split merged cells
If the merge was your most recent action, use Ctrl+Z on Windows or Command+Z on macOS to undo it. Undo is useful immediately after a change, but it is not a substitute for preserving data before a merge, especially after you have made other edits.
To split a merged cell later, select it and choose Format > Merge and Unmerge Cells > Split Cells, if that command is available for the selection. The cells return to separate positions, but splitting does not necessarily restore every original value that was in the range before it was merged. It also does not recreate the previous layout or formatting automatically. Check the cells after splitting and restore any needed content from a backup or another copy.
If you cannot tell whether a cell is merged, click it and inspect the selected area. The selection may cover multiple row or column positions, and the merge menu can show the applicable merge or split action. You can also look at the row and column boundaries around the cell to understand how much of the sheet it spans.
Common problems and fixes
- The merge command is unavailable: confirm that you have selected a normal rectangular range of cells and that the sheet is not protected in a way that blocks editing. Try selecting the range again, then use the Format menu.
- The text is not centered: you may have chosen Merge Cells rather than Merge and Center Cells. Select the merged cell and change its horizontal alignment with the formatting controls.
- Some content seems to have disappeared: undo immediately if possible, or inspect the confirmation choice and restore the original values from a saved copy. Do not assume a merge stores every original cell value for later recovery.
- Sorting or filtering behaves awkwardly: check whether merged cells are inside the data range. Unmerge cells in the table body and keep merges confined to a title or separate presentation area.
- The merged text is cut off: widen the columns, enable text wrapping, or adjust the row height. The merged area may not display all text at its current size.
When a spreadsheet is shared, it can also help to tell collaborators which cells are intentionally merged. A visually large cell may look like several ordinary cells at first glance, and users may try to type into a covered position or apply a sort to a range that includes the merged area.
Frequently Asked Questions
How do I merge cells in LibreOffice Calc without centering the text?
Select the range and choose Format > Merge and Unmerge Cells > Merge Cells. Then set the text alignment separately if needed. Use Merge and Center Cells only when horizontal centering is wanted.
Can I merge cells that contain data?
Yes, Calc can prompt you when the selection contains content. Read the prompt carefully because merging affects cells other than the upper-left cell. To protect information, copy it elsewhere or cancel until you have decided how to preserve it.
Can I merge several rows into separate horizontal cells at once?
A single selection across several rows and columns becomes one merged rectangle; it does not automatically create one merge per row. Merge each row’s range separately if you want distinct horizontal merged cells.
How do I unmerge cells in Calc?
Select the merged cell and use Format > Merge and Unmerge Cells > Split Cells when available. Then check the separated cells and restore any content or formatting that you still need.
Should I merge cells in a table I need to sort?
Usually not in the table’s data area. Keep each record and field in its own cell so sorting, filtering, and later analysis remain straightforward. A merge confined to a heading above the table is less disruptive.
Related
- Parse Text to Columns in Excel: Steps and Tips
- Jupyter Split Cell: How to Split a Cell in a Notebook
- Excel Flash Fill on Visible Cells: What to Know
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Change the Background View in Outlook on Any DeviceTo change Outlook’s appearance, open its appearance or theme settings and choose a light, dark, or colored theme;…
- How to Insert Citations in Microsoft Word: A GuideTo insert a citation in Microsoft Word for Microsoft 365 on Windows, open the References tab, choose a…
- How to Get Rid of the Paste Options Box in Excel 365To stop Excel for Microsoft 365 on Windows from showing the floating Paste Options button after you paste,…
- How to Flip Column Order in Excel Without Moving RowsTo flip columns in Excel while keeping each column’s data together, add a temporary numbered row, select the…
- Excel Flash Fill: How to Disable Automatic SuggestionsTo disable automatic Flash Fill in Excel for Microsoft 365 on Windows, go to File > Options >…
- Can You Sort by Date in Google Sheets? Steps and TipsYes. In Google Sheets in a web browser, select your table and choose Data > Sort range >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.