What "merging tables" means in Excel

Merging tables in Excel means combining data from two or more separate tables into a single table. This is different from merging cells (which squashes multiple cells into one). When you merge tables, you're usually either stacking one table below another, placing them side by side, or joining them based on a shared column of data.

Excel doesn't have a single "merge tables" button. Instead, you choose a method based on how your tables are organized and what they have in common. The three most common approaches are stacking tables vertically, placing them horizontally next to each other, or using a lookup formula to pull matching data from one table into another.

Key Takeaways

  • Stacking tables vertically works when both tables have the same columns in the same order — copy the data from the second table and paste it below the first.
  • Placing tables side by side works when both tables have the same number of rows and you want to add new columns of data to your existing table.
  • Using VLOOKUP or INDEX/MATCH formulas lets you pull data from one table into another based on a matching column, without physically moving the original data.
  • Before merging, check that column names match, data types are consistent, and you have backups of both original tables.

Stacking tables vertically (one below the other)

This is the simplest merge when both tables have identical column headers in the same order. You're essentially extending one table by adding rows from the second table underneath it.

Step 1: Open both tables in the same workbook. If they're in separate files, open the file with the second table, select all its data (including headers), and copy it. Then switch to the file with your first table.

Step 2: In your first table, click the cell in the row immediately below your last row of data. If your first table ends at row 50, click the first cell in row 51.

Step 3: Right-click and select Paste Special. Choose Values (not formulas), then click OK. This prevents Excel from pasting formatting or formulas you don't want.

Step 4: Check that the data lined up correctly. If column headers don't match exactly, Excel won't know which columns belong together, and your data will paste into the wrong columns.

A common mistake: copying headers from the second table and pasting them again. You only need headers once, at the very top. If you pasted headers twice, delete the duplicate row.

Placing tables side by side (adding columns)

Use this method when you have two tables with the same number of rows and you want to add new columns from the second table to the first. Both tables must be in the same order — row 1 of table A must correspond to row 1 of table B.

Step 1: Click the column header to the right of where you want to insert the new data. If your first table ends in column D, click column E.

Step 2: Open the second table (or switch to the sheet where it lives). Select all the data you want to add, excluding the header row if you don't need a duplicate. Copy it.

Step 3: Go back to your first table and right-click the cell where you want to paste. Select Paste Special, choose Values, and click OK.

Step 4: Add a header to the new column. Click the cell directly above your pasted data and type a descriptive name.

This method assumes your rows are already in the same order. If they're not, you'll end up matching the wrong data. In that case, use a lookup formula instead (see the next section).

Using VLOOKUP to match and merge data

When your two tables don't have the same row order, or when you only want to pull specific columns from the second table, use a VLOOKUP formula. This formula looks up a value in one table and returns a matching value from another column in the same table.

Step 1: In your first table, click the cell where you want the merged data to appear. This should be in a new column to the right of your existing data.

Step 2: Type this formula (replace the bracketed parts with your actual cell references):

=VLOOKUP([lookup value], [table array], [column index], FALSE)

For example, if you're looking up a customer ID from column A in your first table, and you want to find that customer's phone number from a second table on Sheet2, the formula looks like this:

=VLOOKUP(A2, Sheet2!A:D, 4, FALSE)

This tells Excel: "Find the value in A2 within the range A:D on Sheet2, and return the value from the 4th column of that range."

Step 3: Press Enter. If the lookup value exists in the second table, Excel returns the matching data. If it doesn't exist, you'll see #N/A.

Step 4: Copy the formula down to all rows in your first table. Click the cell with the formula, then drag the small square in the bottom-right corner down to the last row of your table.

A common mistake: using TRUE instead of FALSE at the end of the formula. FALSE means "exact match only," which is what you want. TRUE allows approximate matches and often returns wrong data.

Using INDEX/MATCH for more control

INDEX/MATCH is a more flexible alternative to VLOOKUP. It works the same way — it finds a matching value and returns data from another column — but it's less picky about where the lookup column is located.

Step 1: Click the cell where you want the merged data to appear.

Step 2: Type this formula:

=INDEX([return range], MATCH([lookup value], [lookup range], 0))

For example, if you're looking up a product code from column A in your first table and want to find the price from a second table on Sheet2 (where product codes are in column B and prices are in column D):

=INDEX(Sheet2!D:D, MATCH(A2, Sheet2!B:B, 0))

Step 3: Press Enter. Copy the formula down to all rows, just as you would with VLOOKUP.

INDEX/MATCH is especially useful when the column you're looking up is to the right of the column you want to return. VLOOKUP can only return columns to the right of the lookup column, but INDEX/MATCH has no such restriction.

Checking your merged table for errors

After you merge, spend a few minutes checking that the data combined correctly. Mismatched column headers, duplicate rows, or formula errors can slip in easily.

Look for #N/A errors: If you used VLOOKUP or INDEX/MATCH, these errors mean the lookup value wasn't found in the second table. Check that the spelling and formatting match exactly — "Smith" and "smith" are different to Excel.

Check for duplicate headers: If you stacked tables vertically, make sure you don't have the header row twice. Delete any duplicate header rows.

Spot-check a few rows: Pick three or four rows at random and verify that the data makes sense. If you merged customer data, check that each customer's phone number and address are correct.

Look for blank cells: Unexpected blanks often mean the merge didn't work as intended. Scroll through and see if there are patterns — for example, blanks only in certain columns or after a certain row.

Frequently Asked Questions

Can I merge tables that have different numbers of rows?

Yes, but the method depends on what you're trying to do. If you're stacking vertically, the second table just adds more rows — the number doesn't have to match. If you're placing tables side by side, you'll have blank cells in the shorter table. If you're using VLOOKUP or INDEX/MATCH, the number of rows doesn't matter at all.

What if the column headers don't match exactly?

Excel treats "Customer ID" and "Customer_ID" as different column names. Before merging, edit one or both tables so the headers match exactly — same spelling, same spacing, same capitalization. This prevents data from pasting into the wrong columns.

How do I undo a merge if I made a mistake?

Press Ctrl+Z (or Cmd+Z on Mac) immediately after the merge. Excel will undo the last action. If you've already done other work, you can also close the file without saving and reopen it to start over.

Can I merge tables from different Excel files?

Yes. Open both files, copy the data from the second file, and paste it into the first. You can also use a formula that references another file — type the file path in brackets, like =VLOOKUP(A2, [C:\Users\Documents\sales.xlsx]Sheet1!A:D, 4, FALSE) — but this only works if both files stay in the same location.

What's the difference between merging tables and merging cells?

Merging cells combines multiple cells into one large cell, usually for formatting headers. Merging tables combines data from two separate tables into one. They're completely different operations and use different Excel features.