Skip to main content

Excel Formula: Combine cells with comma

Here this tutorial provides some formulas to join multiple cells into one cell with comma as separator as below screenshot shown, and also explains how the formulas work in Excel.
doc check if contains some but not others 1

Formula 1 Combine cells with comma by using &

Generic formula:

text_1&","&text_2&","&…&"," &text_n

Arguments

Text_1, text_2, text_n: the cells or text strings you want to combine with comma.

How this formula work

For instance, you want to combine the cells of each row across column B, column C, column D and column E into one cell with commas, please use below formula in a blank cell.

=B3&","&C3&","&D3&","&E3

Press Enter key, then the cells are combined with comma separated.
doc combine cells with comma 2

Explanation

& : using this connector to combine cells and commas.

Remark

If you want to directly use texts instead of cell references in the formula, please embrace the text strings with double quotation marks.
doc combine cells with comma 3

Formula 2 Combine cells with comma by using CONCATENATE function

Generic formula:

CONCATENATE(text_1,",",text_2,",",…",",text_n)

Arguments

Text_1, text_2, text_n: the cells or text strings you want to combine with comma.

How this formula work

For instance, you want to combine the cell B3, C3, D3 and E3 into one cell with commas, please use below formula in a blank cell.

=CONCATENATE(B3,",",C3,",",D3,",",E3)

Press Enter key, then the cells are combined with comma separated.
doc combine cells with comma 4

Explanation

CONCATENATE function: CONCATENATE function is used to join text together.

Remark

If you want to directly use texts instead of cell references in the formula, please enclose the text strings with double quotation marks.
doc combine cells with comma 5

If there are blank cells which are used to be combined, there will be extra comma in the combined cell by using above 2 formulas (& and CONCATENATE) as below screenshot shown.
doc combine cells with comma 6

In this case, please choose formula 3.

Formula 3 Combine cells with comma by combining SUBSTITUTE and TRIM functions

Generic formula:

=SUBSTITUTE(TRIM(text_1&" "&text_2&" "&…&" "&text_n)," ",", ")

Arguments

Text_1, text_2, text_n: the cells or text strings you want to combine with comma.

How this formula work

For instance, you want to combine the cell B3, C3, D3 and E3 into one cell with commas, please use below formula in a blank cell.

=SUBSTITUTE(TRIM(B3&" "&C3&" "&D3&" "&E3)," ",", ")

Press Enter key, then drag the fill handle down to apply this formula to the cells you need to combine, then the cells are combined with comma separated.
doc combine cells with comma 7

Explanation

TRIM function: the TRIM function removes all extra spaces from the text string. Here TRIM(B3&" "&C3&" "&D3&" "&E3) will combine cells with spaces and then clear the extra spaces, this formula will stop the trailing or leading comma.

SUBSTITUTE function: the SUBSTITUTE function is used to replace text with the specific text. Here =SUBSTITUTE(TRIM(B3&" "&C3&" "&D3&" "&E3)," ",", ") will replace space with comma and space in the combined text string (the combination of B3, C3, D3 and E3).

Remark

If you want to directly use texts instead of cell references in the formula, please enclose text strings with double quotation marks.

Combine cells with other separators

If you want to use other separators to replace commas, change “,” in the formulas to other separators. For instance, combine with plus symbol.

=SUBSTITUTE(TRIM(B6&" "&C6&" "&D6&" "&E6)," ","+")
Or
=CONCATENATE(B3,"+",C3,"+",D3,"+",E3)
Or
=B3&"+"&C3&"+"&D3&"+"&E3
doc combine cells with comma 8

Sample File

doc sampleClick to download sample file


Relative Formulas

  • Check if a cell contains a specific text
    To check if a cell contains some texts in range A but does not contain the texts in range B, you can use an array formula which combines the COUNT, SEARCH and AND function in Excel
  • Check if a cell contains one of several values but exclude other values
    This tutorial will provide a formula to quickly handle the task that check if a cell contains one of things but excluding other values in Excel and explain the arguments of the formula.
  • Check if cell contains one of things
    Supposing in Excel, there is a list of values in column E, you want to check if the cells in column B contain all of the values in column E, and return TRUE or FALSE.
  • Check if cell contains number
    Sometimes, you may want to check if a cell contains numeric characters. This tutorial provides a formula which will return TRUE if the cell contains number, FALSE if cell does not contain number.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


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

  • 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, Edge and Firefox.
Comments (1)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
If you have Office 365 use the new ArrayToText function.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations