
In other words, you will lose any data that isn’t in the first cell. If you attempt to merge cells where data is in any other cell, Excel will return the error message, Merging cells only keeps the upper-left value and discards other values. Remember, the column should be wide enough to write or merge all the texts in one cell. Every day, most analysts merge data in Excel and other spreadsheet programs to get better insights. If there is data in the cells being merged, Excel will only keep what is in the upper leftmost cell.

Else, it will not give you the desired result. However, before using the option, you’ll need to first increase the width of the column. Inside the Home tab (in your Excel worksheet) look for the Fill option. If you are not comfortable with VBA programming or macros, then you can use Excel’s Justify feature. Merge Cells using Excel’s Justify Feature I’ll loop through the Selection object to extract each cells value and concatenate the texts and numbers (if any) and store it in a variable.įinally, I’ll use the Selection object again, to assign the extracted values to a cell (Cells(1) or the first cell in the first row), align it according to my requirement and merge it. The Selection object represents the selected area in the worksheet. Important: When you merge multiple cells, the contents of only one cell (the upper-left cell for left-to-right languages, or the upper-right cell for right-to-left languages) appear in the merged cell.

#HOW DO YOU MERGE CELLS IN EXCEL AND KEEP DATA HOW TO#
In the macro, I am using the Selection object as a Range. Watch this short video that shows you how to merge several cells in Microsoft Excel and still retain all the data in both cells.

First, select or highlight the rows that you wish to merge and then hit the button. Now here's how you will merge all the cells value.
