Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to combine contents of multiple cells without losing data in Excel?

We may combine cells and their contents in Microsoft Excel frequently. However, do you find out the easiest way to combine cell contents? Here we will talk about how to combine cell contents in Excel easily and quickly.

Combine multiple cells into one cell with VBA code

Combine multiple cells into one cell with Kutools for Excel without losing data


Easily combine two columns into one (combine first and last name) in Excel:

The Combine columns or rows utillity of Kutools for Excel can help you easily combine cells of selected columns into one. For example, you can quickly combine first and last name into a full name cell with the settings as below screenshot shown.

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

Combine multiple cells into one cell with VBA code


The following VBA code can help you to combine multiple cells into one cell, and you can apply the code with following steps:

1. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following code into the Module:

Sub MergeOneCell()
'Updateby20140128
Dim Rng As Range
Dim WorkRng As Range
Dim Sigh As String
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Sigh = Application.InputBox("Symbol merge", xTitleId, "", Type:=2)
xOut = ""
Application.DisplayAlerts = False
For Each Rng In WorkRng
    xOut = xOut & Rng.Value & Sigh
Next
With WorkRng
    .Merge
    .Value = VBA.Left(xOut, VBA.Len(xOut) - 1)
End With
Application.DisplayAlerts = True
End Sub

2. Then click doc-multiply-calculation-3 button to execute the code. A dialog pops up for you to select a range to work with the VBA. See screenshots:

3. Click Ok, another dialog is displayed for you to specify the seperator. See screenshot:

doc combine cell contents 2

4. Click Ok, then the cell contents in the selected range are combined into a cell. See screenshot:

doc combine cell contents 3


Combine multiple cells into one cell with Kutools for Excel without losing data

If you have Kutools for Excel installed, you can combine cell contents of multiple columns or rows conveniently without using formulas.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

1. Select the cells that you want to merge the data. And apply this utility by clicking Kutools > Combine.

2. In the Combine Columns or Rows dialog box, specify the options that you need. See screenshot:

  • (1.) Select Combine into single cell under To combine selected cells according to following options;
  • (2.) Specify a separator for the combined data. You can separated each content with space, nothing, semicolon, or specific text. And you can also display the combined content in a new line.

doc combine cell contents 5

3. Then click OK or Apply, all of the data in multiple cells have been merged into one cell. See screenshot:

Note: This utility can aslo help to combine cells of selected columns. You can combine first and last name into a single full name cell as below screenshot shown.

Then you can see the first names and last names are combined and located in the full name cells.

Tip.If you want to have a free trial of this utility, please go to download the software freely first, and then go to apply the operation according above steps.


Related Articles


Demo: Combine / Merge multiple cells into one without losing data

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    jennifer · 3 years ago
    my earlier query is about this vba:Sub MergeOneCell()
    'Updateby20140128
    Dim Rng As Range
    Dim WorkRng As Range
    Dim Sigh As String
    On Error Resume Next
    xTitleId = "KutoolsforExcel"
    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
    Sigh = Application.InputBox("Symbol merge", xTitleId, ",", Type:=2)
    xOut = ""
    Application.DisplayAlerts = False
    For Each Rng In WorkRng
    xOut = xOut & Rng.Value & Sigh
    Next
    With WorkRng
    .Merge
    .Value = VBA.Left(xOut, VBA.Len(xOut) - 1)
    End With
    Application.DisplayAlerts = True
    End Sub
    Between, what does the type here, "8" & "2" refers to
  • To post as a guest, your comment is unpublished.
    jennifer · 3 years ago
    how repeat the process if i have 4 different reference and need to combine them one after the other
  • To post as a guest, your comment is unpublished.
    TJ · 4 years ago
    Awesome! Greatly helps! Thank you so much!
  • To post as a guest, your comment is unpublished.
    priya · 4 years ago
    how to merge 2 cell ex:-[a1:41.00] [B1:kWh] [C1:041.00 kWh]
  • To post as a guest, your comment is unpublished.
    Tom · 5 years ago
    Thanks very much - was a big help!
  • To post as a guest, your comment is unpublished.
    Romilla W · 5 years ago
    Thamks a lot for the code. Was very helpful.
  • To post as a guest, your comment is unpublished.
    Damon R · 5 years ago
    Very helpful thank you took me a while to find it but was just what I needed. Note in the VBA code if you want to seperate data with a semicolon, comma or some other charater in the "delim = " "
    " field put you charater betwen the quotes example: delim = ";".

    Thanks again.