In case you have a requirement on combining multiple columns to on column & you did not have a clue then this whole article is for you. In this article we are going to learn how to combine multiple columns to one column using vba code.

From below snapshot:-

Following is the snapshot of require output:-

We need to follow the below steps:

How to join cells together in excel

Using a Formula CONCATENATE + TRANSPOSE to Combine Values. The best way to combine text. Below are the steps to merge the first and the last name using ampersand: Click on the first cell of the column where you want the combined names to appear (C2). Type equal sign (=). Select the cell containing the first name (A2) followed by an ampersand (&).

  • Click on Developer tab
  • From Code group select Visual Basic

Enter the following code in the standard module

Sub MultipleColumns2SingleColumn()

Const shName1 As String = 'Sheet1' 'Change sheet name here

Const shName2 As String = 'Sheet2'

How Do You Merge Cells In Excel

Dim arr, arrNames

With Worksheets(shName1)

arrNames = .Range('F1', .Cells(1, Columns.Count).End(xlToLeft))

For i = 2 To .Cells(Rows.Count, 1).End(xlUp).Row

arr = .Cells(i, 1).Resize(, 4)

With Worksheets(shName2)

With .Cells(Rows.Count, 1).End(xlUp)

.Offset(1).Resize(UBound(arrNames, 2), 4) = arr

.Offset(1, 5).Resize(UBound(arrNames, 2)) = Application.Transpose(arrNames)

End With

End With

Next

End With

How To Join Cells Together In Excel

End Sub

As you execute the macro; the macro will transfer the data from multiple columns to a single column.

In this way we can combine multiple columns data in a single column.

Move or combine multiple cell contents into one cell

This tutorial will talk about how to combine multiple cell contents into one single cell as below screenshot shown. In Excel, you can use the & symbol, CONCATENATE or TEXTJOIN function to solve this task quickly and easily.

Move or combine multiple cell contents into one with & symbol

By using the & symbol, you can join multiple cells into one cell, please apply the below formula into a blank cell:

Then, press Enter key, all of the specified cell contents have been merged into one cell, see screenshot:

ExcelExcel Merge Columns Into One Cell

Note: In the above formula: A2, A3, A4, A5, A6, A7 and A8 are the cells that you want to combine; “ ” is a space delimiter that separate the combined data, if you want to use other delimiters, you just need to replace the space string with other separator, such as “,”, “-” etc.

Move or combine multiple cell contents into one cell with CONCATENATE function

If there is long list of cells need to be merged, the above formula will be too long to type, here, I will introduce a simple formula which is created by CONCATENATE and TRANSPOSE functions.

1. Please apply the following formula into a blank cell where you want to put the result:

=CONCATENATE(TRANSPOSE(A2:A8)&',')

2. Then select the entire formula which inside the CONCATENATE function, and then press F9 key on the keyboard, this formula will be converted to an array, see screenshots:

3. And then, you should remove the curly brackets from the start and the end of the array, see screenshots:

4. After removing the curly brackets, please press Enter key directly, and all the cell contents have been merged into one cell, see screenshot:

You can also view the below demo to see the entire operation process:

Notes:

1. In the above formula, A2:A8 is the range of cells that you want to combine; “,” is a comma delimiter that separate the combined data, please change them to your need.

2. After finishing this formula, a comma will be displayed at the end of the last cell value, to remove this comma, you just need to double click the formula cell, and delete the comma after the last value.

Move or combine multiple cell contents into one with TEXTJOIN function

In Excel 2019 or Office 365, there is new TEXTJOIN function may help you to combine cell values from different cells into a single cell with ease.

Excel Merge Columns Into One Cell

The generic syntax of the TEXTJOIN is:

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)
  • delimiter: (Required) A separator or character that is used to separate the combined data.
  • ignore_empty: (Required) Determine whether to ignore the empty cells, if TRUE, the empty cells will be ignored; if FALSE, the empty cells will be included.
  • text1: (Required) The first text or cell to be combined.
  • text2...: (Optional) The additional texts or cells to be combined.

Please enter or copy the following formula into a blank cell:

And then, press Enter key to get the result, see screenshot:

Note: In the above formula, A2:A8 is the range of cells that you want to combine; “-” is a hyphen delimiter that separate the combined data, please change them to your need.

Relative functions used:

  • CONCATENATE:
  • The Excel CONCATENATE function is used to join two or more text items from multiple cells into one.
  • TRANSPOSE:
  • The TRANSPOSE function rotates the orientation of a range or array. For example, it can rotate a table that arranged horizontally in rows to vertically in columns or vice versa.
  • TEXTJOIN:
  • The Excel TEXTJOIN function joins multiple values from a row, column or a range of cells with specific delimiter.

Excel Merge Columns Into One Cell Formula

More articles:

  • In Excel, sometimes, you may want to combine cells into one cell with line break as below screenshot shown. Here, in this tutorial, it introduces two formulas to solve this task with examples.
  • If you have a list of text strings or sentences, now, you want to extract the specific nth word from the list as below screenshot shown. This article, I will introduce some methods for solving this job in Excel.
Columns
  • If there is part of the text surrounded with the parentheses within the text string, now, you need to extract all the text strings between the parentheses as following screenshot shown. How could you solve this task in Excel quickly and easily?
  • Normally, the Find and Replace feature can help you to find a specific text and replace it with another one, but, sometimes, you may need to find and replace multiple values simultaneously. For example, to replace all “Excel” text to “Excel 2019”, “Outlook” to “Outlook2019” and so on as below screenshot shown. This article, I will introduce a formula for solving this task in Excel.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Excel Merge Column Into Single Cell

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

Excel Combine Columns Into One Cell Separated By Comma

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.

Excel Combine Columns Into Single Cell

or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
Coments are closed

Most Viewed Posts

  • My Address Here
  • Zoom Discord
  • Kingdom Amazon Prime

Scroll to top