How to Create a Table with Merged Cells in Excel (4 Easy Methods)

Representing data clearly and concisely is an essential skill in this data-driven world. As a result, representing data in a table has become crucial as it is one of the greatest ways of expressing data. In this article, we will learn how to create a table with merged cells in Excel.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


4 Useful Methods to Create a Table with Merged Cells in Excel

One of the major drawbacks of an Excel table is that you can not create a table with merged cells. Suppose, you have a data set that consists of multiple merged cells like below.

How to Create a Table with Merged Cells in Excel

Here D3, E3, and F3, G3 are merged. Now,  if you want to create a table with these cells, you will get results like this.

How to Create a Table with Merged Cells in Excel

Here, notice that Excel has unmerged the merged cells by itself and created additional column headers. To solve the problem, we have to follow a technique that will allow us to create a table consisting of merged cells. Please note that this will not be precisely an excel table, but the data formatting will be like an excel table. Let’s explore our first method.


1. Use of Center Across Selection Option to Merge Cell While Creating a Table

In this method, we first need to transform the Table into a normal range. Then we will apply a special alignment option. To do this follow the steps below.

Steps:

  • First, select any cell of the Table, and then go to the Table Design
  • Then in the Tools group, click on the Convert to Range

Use of Center Across Selection Option to Merge Cell While Creating a Table

  • Now, in the dialogue box, click on Yes. This will convert the Table into a normal range.

Use of Center Across Selection Option to Merge Cell While Creating a Table

  • Then we have to erase the texts of cells E3 and E4

Use of Center Across Selection Option to Merge Cell While Creating a Table

  • Now, select D3 and E3 cells, and in the Alignment group, click on the arrow icon to open all the commands of the alignment group.

  • A dialogue box titled Format Cells will pop up. Now, from the drop-down menu under the Horizontal option, select the Center Across Selection option and click OK.

Use of Center Across Selection Option to Merge Cell While Creating a Table

  • Now, you will see that the “Mid Term” text has come in the middle of D3 and E3 cells that look like they are merged. In fact, the text is only in D3 and E3 is empty.


  • Follow the same steps for cells F3 and G3. You will have the same result.

Use of Center Across Selection Option to Merge Cell While Creating a Table

  • This Table looks exactly like an excel table but lacks features of excel tables such as Sorting and Filtering.
  • If your merged cells are not in the header columns ( on the top row), you can convert it into an excel table.
  • A limitation of this method is that it is only applicable when the cells need to be horizontally merged. For vertically merged cells, we have to follow other methods.

2. Application of Convert to Range Feature to Generate a Table with Merged Cells

This method is applicable for both vertically and horizontally merged cells. We have taken another data set with multiple vertically merged cells to know how this method works.

In the above data set, B4B5, B6B7, B8B9, B10B11, C4C5, C6C7, C8C9, and C10C11 are merged. Now we want to create a table from this dataset. To do that, follow the steps below.

Steps:

Application of Convert to Range Feature to Generate a Table with Merged Cells

  • Here, we can see that Excel has automatically unmerged the previously merged cells. Also, notice that the Merge & Center option is unavailable. Hence, to merge those cells again, we have to convert the Table into a range.
  • First, select any cell of the Table, and then go to the Table Design
  • Then in the Tools group, click on the Convert to Range

Application of Convert to Range Feature to Generate a Table with Merged Cells

  • In the popped-up dialogue box, select Yes.

Application of Convert to Range Feature to Generate a Table with Merged Cells

  • Consequently, the Table has again converted into a range.

Application of Convert to Range Feature to Generate a Table with Merged CellsNow, we can merge those unmerged cells again. So select the cells B4 and B5 first, then click on the Merge & Center option.

  • The cells will be merged again.

Application of Convert to Range Feature to Generate a Table with Merged Cells

  • Now, do the same thing for other cells. You will get the final result like this.

Application of Convert to Range Feature to Generate a Table with Merged Cells


3. Using Context Menu Option to Create a Table with Merged Cells

There is an alternative way (and perhaps quicker) to convert a table to a range. Once you convert the Table to a range, the rest of the procedure is the same as method 2. To apply this method, follow the steps below.

Steps:

  • Convert the dataset into a table using the same process mentioned in method 2

  • Now select any cells of the Table and right-click on the Mouse. A context menu will appear. From the menu, select Table > Convert to Range.

Using Context Menu Option to Create a Table with Merged Cells

  • Now, a popup will appear. Select

Using Context Menu Option to Create a Table with Merged Cells

  • After clicking Yes, the Table will be converted into a range like this below.

Using Context Menu Option to Create a Table with Merged Cells

  • Now, follow the same steps to merge the cells like method 2. You will get the same result as this.

Using Context Menu Option to Create a Table with Merged Cells


4. Run a VBA Code to Create a Table with Merged Cells

We can also run VBA code to convert an excel table to a range and then merge the unmerged cells by using the same procedures mentioned in the previous methods. To run VBA code, follow the steps below.

Steps:

  • Press ALT+F11 to open Microsoft Visual Basic window. In the window, Go to the Insert tab (from the Toolbar) > Select Module (from the options).

Run a VBA Code to Create a Table with Merged Cells

  • Now paste the following code into the Module.
Sub TableToRange()
Dim wrkSheet As Worksheet
Dim wrkList As ListObject
Set wrkSheet = ActiveWorkbook.ActiveSheet
For Each wrkList In wrkSheet.ListObjects
wrkList.Unlist
Next
End Sub

Run a VBA Code to Create a Table with Merged Cells

  • Now Press the F5 key to run the macro. After running the code, you will see that the Table has been converted to a range.
  • Now use the same procedure to merge the required cells. You will get the final result like this.

Run a VBA Code to Create a Table with Merged Cells


Things to Remember

  • Excel Tables do not allow to merge cells within a table
  • Following the methods mentioned above, we can represent our data in a table format but they will not offer the functions that an excel table posses.

Conclusion

That is the end of this article. If you find this article helpful, please share this with your friends. Moreover, do let us know if you have any further queries. Finally, please visit Exeldemy for more exciting articles on Excel.

Aniruddah Alam

Aniruddah Alam

Hi, I am Md. Aniruddah Alam from Dhaka, Bangladesh. I have done my Bachelor's degree in Naval Architecture from BUET. I love to read books, listen to podcasts, explore new things, walking randomly in unknown places.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo