To merge cells in Excel, select the cells, go to the Home tab, and click Merge and Center. That joins them into one cell, but it keeps only the value in the upper left cell and deletes everything else, so it is safe only when the other cells are empty. To merge without losing data, combine the contents into one cell first with a formula such as =A2&" "&B2, then merge for appearance if you still need to. When you only want the centered look, use Center Across Selection instead, which spans the text visually while leaving each cell intact.
Merged cells look tidy, but they quietly break sorting, filtering, and copy paste, which matters when the data came out of a converted document and you still need to work with it. Here is how to merge, how to keep your data, and the alternative that gives you the same appearance without the headaches.
How do you merge cells in Excel?
Select two or more adjacent cells, then on the Home tab click the arrow next to Merge and Center. Merge and Center joins the cells and centers the result, Merge Across joins cells in each row separately, and Merge Cells joins them without changing the alignment. Excel warns you that merging keeps only the upper left value, because it discards the rest. Use merging for a title that spans several columns, not for cells that each hold data you need to keep.
How do you merge cells without losing data?
Combine the values before you merge anything. In a spare cell type =A2&" "&B2, or =CONCAT(A2," ",B2) in Excel 2019 and later, to join the contents with a space between them. Copy that result, paste it back as a value with Paste Special, then merge only if you want the visual effect. The point is that merging never combines text; it only ever keeps one cell and drops the others, so you have to build the joined value yourself first if every piece matters.
How do you keep both values when merging cells?
You cannot keep two values inside one merged cell, because a cell holds a single value. The workaround is to concatenate first: put =A2&", "&B2 in a new column to join both entries into one string, convert that column to static text with Paste Special, Values, and then delete the originals if you no longer need them. Now the one cell genuinely contains both pieces of information, and you can merge it with neighbors purely for layout without losing anything.
What is Center Across Selection?
Center Across Selection centers text across several columns without actually merging the cells, so you get the merged look while every cell stays separate and usable. Select the range, press Ctrl and 1 to open Format Cells, go to the Alignment tab, and under Horizontal choose Center Across Selection. The text from the leftmost cell appears centered over the whole range, but each underlying cell is still its own cell. This is the professional choice for headers because it does not break the features that real merged cells do.
Should you use Merge and Center or Center Across Selection?
| Method | Best for | Downside |
|---|---|---|
| Merge and Center | A title over empty cells | Breaks sorting and filtering, deletes other values |
| Center Across Selection | Centered headers over data | Only centers horizontally |
| Combine first, then merge | Keeping every value in one cell | Takes an extra formula step |
Why can't I sort or filter after merging cells?
Merged cells break sorting and filtering because Excel no longer sees a clean grid of one value per row. Sorting a range that contains merged cells throws the error "To do this, all the merged cells need to be the same size," and a filter will not pull the right rows when a merge spans several of them. This is the main reason to avoid merging inside a data table and to use Center Across Selection for headers instead. If you inherited a sheet that will not sort, unmerge everything first and the operations work again.
How do you merge cells across multiple rows?
Select a vertical block of cells and use Merge Cells (not Merge and Center) to join them into one tall cell, which is common for a category label that spans several rows of a table. As with any merge, only the top cell's value survives, so type the label after merging or make sure the lower cells are empty first. Be aware that a vertically merged cell blocks sorting just as a horizontal one does, so if the table needs to stay sortable, leave the label in the top row and simply hide the repetition, or repeat the label in every row instead of merging.
How do you unmerge cells in Excel?
Select the merged cell or the whole range, go to the Home tab, and click Merge and Center again to toggle it off, or click the arrow and choose Unmerge Cells. The text drops back into the upper left cell and the other cells become empty again. To clear merging across an entire sheet quickly, press Ctrl and A to select all, then click Merge and Center twice so it turns off everywhere. Unmerging is the first fix when a downloaded or converted file refuses to sort.
Cleaning up merged headers from a conversion
Documents often use merged title bands, and some converters carry that formatting straight into the spreadsheet, which then blocks sorting and filtering. The quickest cleanup is to select all, unmerge everything, and rebuild any header you want with Center Across Selection so the sheet stays fully sortable. If the values themselves are split across columns and you need them joined, that is a combine job rather than a merge, covered in how to combine two columns in Excel. Starting from a clean grid is easier when the PDF to Excel converter keeps each value in its own cell, the kind of tidy export that also feeds an accounts payable workflow without manual rework.
The short version
Merge and Center keeps only the upper left value, so use it for titles over empty cells, never for data. To keep every value, join the cells with =A2&" "&B2 first, paste as values, then merge if you want. For centered headers that still let you sort and filter, use Center Across Selection instead of merging. And when a converted sheet will not sort, unmerge everything and the problem goes away.