Learning how to merge rows in Excel can save you hours of manual data cleanup and transform messy spreadsheets into organized, professional reports. That said, whether you are combining duplicate entries, consolidating weekly sales figures, or preparing a mailing list, knowing the right way to merge rows in Excel ensures that your data stays accurate and easy to analyze. Practically speaking, many beginners assume there is a single “Merge Rows” button, but Excel actually offers several methods depending on whether you want to keep all your information or simply format cells for visual clarity. In this guide, you will discover step-by-step techniques to merge rows safely, avoid common pitfalls, and choose the best approach for your specific project.
The official docs gloss over this. That's a mistake.
What Does It Mean to Merge Rows in Excel?
Before diving into the steps, it is the kind of thing that makes a real difference. In Excel, merging usually refers to combining two or more adjacent cells into a single larger cell. Still, when people talk about merging rows, they often mean one of two very different things:
- Visual merging: Using the Merge & Center feature to make a header or label span across multiple columns. This is mostly for appearance and often results in data loss because Excel keeps only the value in the top-left cell.
- Data consolidation: Combining the contents of multiple rows into one row without losing information. This requires formulas, Power Query, or VBA because standard cell merging discards everything except the first value.
If your goal is to combine text, numbers, or dates from several rows into a single cell while preserving every detail, you need a data consolidation method rather than a simple formatting tool.
Method 1: Using Merge & Center (The Basic Approach)
The fastest way to merge cells in Excel is through the Merge & Center button on the Home tab. This method is ideal when you want to create a title that stretches across a table or when visual layout matters more than data retention.
Steps to Merge Rows with Merge & Center:
- Select the range of cells you want to merge. Here's one way to look at it: highlight cells A1 through C1 if you want one row to span three columns.
- Go to the Home tab on the ribbon.
- In the Alignment group, click the Merge & Center dropdown.
- Choose Merge & Center, Merge Across, or Merge Cells based on your layout needs.
- Excel will display a warning stating that merging cells will keep only the upper-left value and discard other data. Click OK to proceed.
Important warning: If you select multiple rows and columns and apply Merge & Center, Excel will delete all data except the value in the top-left cell. Use this method only when you are certain you do not need the information in the other cells.
Method 2: Merging Rows Without Losing Data Using Formulas
Every time you need to combine the contents of multiple rows into one cell while keeping every piece of information, formulas are your best friend. This approach is especially useful for merging names, addresses, or notes that are spread across different rows The details matter here. No workaround needed..
Using the Ampersand (&) Operator
The ampersand is the simplest way to join text from different cells.
- Click on an empty cell where you want the merged result to appear.
- Type a formula such as
=A2 & " " & B2 & " " & C2. - Press Enter.
- Drag the fill handle down to apply the formula to other rows if needed.
This method works well for small datasets, but it becomes tedious if you have dozens of rows to combine.
Using TEXTJOIN and CONCATENATE
For modern versions of Excel (Office 365 and Excel 2019 or later), the TEXTJOIN function is more powerful than the ampersand because it allows you to add delimiters and ignore empty cells.
Syntax: =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Example: =TEXTJOIN(", ", TRUE, A2:A10)
This formula merges all values from cells A2 through A10 into one cell, separated by commas, and skips any blank cells It's one of those things that adds up..
Older versions of Excel rely on CONCATENATE:
=CONCATENATE(A2, " ", B2, " ", C2)
While effective, CONCATENATE does not handle ranges as flexibly as TEXTJOIN, so newer users should prefer the latter when available.
Method 3: Merging Rows with Power Query (Best for Large Datasets)
If you work with large tables and need to merge rows based on a common category—such as combining all orders for the same customer—Power Query is the most efficient solution. Power Query, also known as Get & Transform, is built into Excel and designed for data consolidation.
Steps to Merge Rows Using Power Query:
- Select your data range and press **
Ctrl + T to convert it into an Excel Table. Ensure "My table has headers" is checked and click OK. 2. With any cell in the table selected, go to the Data tab and click From Table/Range in the Get & Transform Data group. This opens the Power Query Editor. 3. In the Power Query Editor, identify the column you want to group by (e.g., Customer ID) and the column containing the values you want to merge (e.g., Product Name). 4. Select the grouping column, then go to the Transform tab and click Group By. 5. In the Group By dialog box:
- New column name: Enter a name for the merged result (e.g., All Products).
- Operation: Select All Rows.
- Click OK.
- You will now see a new column containing "Table" objects. Click the expand icon (two opposing arrows) in the header of this new column.
- In the expand dialog, uncheck the grouping column (since it’s already visible) and any other columns you don’t need. Ensure only the target data column (e.g., Product Name) remains checked. Uncheck "Use original column name as prefix" and click OK.
- With the expanded column selected, go to the Transform tab, click Extract (in the Structured Column group), and choose Text Between Delimiters or, more commonly, add a Custom Column via the Add Column tab for precise control.
For a simple comma-separated list: Use Add Column > Custom Column with the formula:
=Text.Combine([All Products][Product Name], ", ")(Replace[All Products]with your grouped column name and[Product Name]with the actual data column name inside the table). - Remove the intermediate "Table" column (right-click > Remove).
- Click Close & Load on the Home tab to send the consolidated table back to a new worksheet in Excel.
Method 4: Flash Fill (Best for Pattern-Based Merging)
For one-off tasks where data follows a consistent pattern—such as combining "First Name" in column A and "Last Name" in column B into "Last Name, First Name" in column C—Flash Fill is the fastest manual method Most people skip this — try not to. Simple as that..
- In the column adjacent to your data, manually type the desired combined result for the first row only (e.g., type
Doe, Johnin C2). - Press Enter to move to the next cell (C3).
- Press Ctrl + E (or go to Data > Flash Fill).
- Excel detects the pattern and instantly fills the rest of the column.
Note: Flash Fill results are static text. If source data changes, you must re-run Flash Fill.
Choosing the Right Method
| Scenario | Recommended Method |
|---|---|
| Visual headers / Layout only | Merge & Center (Method 1) |
| Combining a few cells, keeping data | TEXTJOIN / & Operator (Method 2) |
| Consolidating thousands of rows by category | Power Query (Method 3) |
| Quick, one-time pattern fixes | Flash Fill (Method 4) |
Conclusion
Merging rows in Excel is rarely a one-size-fits-all operation. Now, the "Merge & Center" button serves a purely cosmetic purpose for headers, but it destroys data—a critical distinction every user must understand. For actual data consolidation, formulas like TEXTJOIN offer immediate, dynamic results for smaller ranges, while Power Query provides a solid, repeatable, and auditable workflow for enterprise-scale datasets. By matching the tool to the task—whether it’s a quick Ctrl+E Flash Fill or a scheduled Power Query refresh—you ensure your data remains both intact and actionable, transforming messy spreadsheets into reliable assets.