How to Merge Vertical Cells in Excel (6 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

The Merging operation helps us combine more than one cell in Excel. Often, we find a data sheet that contains a lot of columns and rows, and this is very inconvenient to handle. However, if we use merging, the data sheet gets a simpler look and becomes easier for us to handle. In this article, we will show you some ways to merge vertical cells in Excel.

Overview Image


Download Practice Workbook

You may download the following workbook to practice yourself.


6 Suitable Methods to Merge Vertical Cells in Excel

In order to illustrate, we will use a sample dataset. For instance, the following dataset represents the brands and models of motorcycles available in a shop. We want to apply different ways of merging it depending on different conditions.

Dataset


Method 1: Applying Merge & Center Command to Merge Vertical Cells with Keeping Only Upper-Left Value

Merge and Center is a great option in Excel to merge more than one cell. However, in the case of vertical merging by this feature, we lose some of the data.

Steps:

  • At first, we select the data that we want to merge and apply the Merge & Center command.

 Merging & Center Command to merge vertical cells

  • Secondly, by hitting ENTER, we get the result of merging.
  • Merging in vertical cells keeps only the uppermost value. We will lose all other values.

Result of Merge & center command

Read More: How to Merge Cells Vertically Without Losing Data in Excel


Method 2: Utilizing Format Cells Box for Merging Cells Vertically

Another way to do the same thing as Merge & Center command is to utilize Format Cells. We will follow the steps below to do it.

Steps:

  • We select the cells as before.

 Utilizing format cell box

  • Then, we press Ctrl+1 together, and the Format Cells box appears. In the box, we select Alignment, Merge Cells, and OK one after another and we get the result.

 Using Format Cells box step-by-step

  • We got the result of Merging only the Suzuki Brand with having only the upper-left value.

Showing Format Cells box result

Read More: How to Merge and Center Selected Cells in Excel (4 Ways)


Method 3: Using Ampersand Operator to Merge Vertical Cells Without Losing Data

It is also possible to use operators to merge cells in Excel. In this method, we will use the Ampersand operator to merge cells vertically with all values without losing any data.

Steps:

  • First, we apply the formula at D5.
=C5&", "&C6&", "&C7

Using formula with Ampersand operator

  • Then, we will hit ENTER and get the merged cell.

Ampersand operator initial result

  • Finally, we will use the AutoFill feature to fill the remaining cells.

 Showing result by using Ampersand operator to merge vertical cells

Read More: How to Merge Text from Two or More Cells into One Cell in Excel


Similar Readings


Method 4: Applying CONCATENATE Function for Merging Cells Vertically

CONCATENATE is a function that we can use in merging cells. To do that, we will follow the following steps.

Steps:

  • First, we apply the formula at D5.
=CONCATENATE(C5,", ",C6,", ",C7)

Applying CONCATENATE function to merge vertical cells

  • Then, we will hit ENTER to get the first value as well.

Initial result of merging vertical cells by the CONCATENATE function

  • Finally, we will use the AutoFill feature to fill the remaining cells.

 Final result of using CONCATENATE Function

Read More: How to Merge Cells in Excel with Data (7 Quick Ways)


Method 5: Using TEXTJOIN Function to Merge Vertical Cells in Excel

We will get the same value using the TEXTJOIN function instead of the CONCATENATE function. The steps are as follows.

Steps:

  • First, we apply the formula at D5.
=TEXTJOIN(",",TRUE,C5,C6,C7)

Using the TEXTJOIN function to merge vertical cells

  • Then, we hit ENTER to get the first value as well.

Initial Result of using the TEXTJOIN function

  • Finally, we will apply the AutoFill feature to fill the remaining cells.

Final result of using the TEXTJOIN function

Read More: How to Merge Text Cells in Excel (9 Simple Methods)


Method 6: Implying VBA Code to Merge Vertical Cells in Excel

The last and most effective method to perform merging is to use VBA code. It will automate all the steps and make it easier for us. We will follow these steps.

Steps:

  • Initially, we will select Developer and then Visual Basic.

Selecting Visual Basic from Developer

  • Next, click on Insert > Module.

Inserting Module

  • After that, we will write the following code.
Sub Merge_Vertical() 
Dim out As Variant
Application.DisplayAlerts = False
out = ""
Dim start As Variant
start = 1
Dim ending As Variant
ending = 1
Dim i As Variant
Dim j As Variant
For i = 2 To Selection.Rows.Count + 1
    If Selection(i, 1) <> "" Or i = Selection.Rows.Count + 1 Then
        ending = i - 1
        For j = start To ending
            If j = ending Then
                out = out + Range(Selection(j, 2).Address).Value
            Else:
                out = out + Range(Selection(j, 2).Address).Value + vbNewLine
            End If
        Next j
        Range(Selection(start, 2).Address) = out
        Range(Selection(start, 1).Address + ":" + Selection(ending, 1).Address).Merge Across:=False
        Range(Selection(start, 2).Address + ":" + Selection(ending, 2).Address).Merge Across:=False
        start = i
        out = ""
    End If
Next i
End Sub 
			

Entering VBA Code

  • Finally, run it by pressing F5.
  • Therefore, the result will look like the image below.

Result of using VBA code to merge vertical cells

Read More: VBA to Merge Cells in Excel (9 Methods)


Conclusion

In the above sections, we have discussed various methods on how to merge vertical cells in Excel. Hope this will be very helpful for you. Let us know your views and recommendations in the comment section. Have a good day.


Related Articles

Junaed-Ar-Rahman

Junaed-Ar-Rahman

Hello! Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed BSc in Biomedical Engineering from Bangladesh University of Engineering and Technology. Always try to gather knowledge from various sources and try to make innovative solutions.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo