In this article, you will learn various ways to concatenate text strings, numbers and dates in Excel using the CONCATENATE function and "&" operator. We will also discuss formulas to combine individual cells, columns and ranges.
In your Excel workbooks, the data is not always structured according to your needs. Often you may want to split the content of one cell into individual cells or do the opposite - combine data from two or more columns into a single column. Common examples are joining names and address parts, combining text with a formula-driven value, displaying dates and times in the desired format, to name a few.
In this tutorial, we are going to explore various techniques of Excel string concatenation, so you can choose the method best suited for your worksheets.
What is "concatenate" in Excel?
In essence, there are two ways to combine data in Excel spreadsheets:
- Merging cells
- Concatenating cells' values
When you merge cells, you "physically" join two or more cells into a single cell. As a result, you have one larger cell that is displayed across multiple rows and/or columns.
When you concatenate cells in Excel, you combine only the contents of those cells. In other words, concatenation in Excel is the process of joining two or more values together. This method is often used to combine a few pieces of text that reside in different cells (technically, these are called text strings or simply strings) or insert a formula-calculated value in the middle of some text.
The following screenshot demonstrates the difference between these two methods:
Merging cells in Excel is the subject of a separate article, and in this tutorial, we'll discuss the two main ways to concatenate strings in Excel - by using the CONCATENATE function and the concatenation operator (&).
Excel CONCATENATE function
The CONCATENATE function in Excel is used to join different pieces of text together or combine values from several cells into one cell.
The syntax of Excel CONCATENATE is as follows:
Where text is a text string, cell reference or formula-driven value.
The CONCATENATE function is supported in all versions of Excel 365 - 2007.
For example, to concatenate the values of B6 and C6 with a comma, the formula is:
=CONCATENATE(B6, ",", C6)
More examples are shown in the image below:
Note. In Excel 365 - Excel 2019, the CONCAT function is also available, which is a modern successor of CONCATENATE with exactly the same syntax. Although the CONCATENATE function is kept for backward compatibility, Microsoft does not give any promises that it will be supported in future versions of Excel.
Using CONCATENATE in Excel - things to remember
To ensure that your CONCATENATE formulas always deliver the correct results, remember the following simple rules:
- Excel CONCATENATE function requires at least one "text" argument to work.
- In one formula, you can concatenate up to 255 strings, a total of 8,192 characters.
- The result of the CONCATENATE function is always a text string, even when all of the source values are numbers.
- Unlike the CONCAT function, Excel CONCATENATE does not recognize arrays. Each cell reference must be listed separately. For example, you should use CONCATENATE(A1, A2, A3) and not CONCATENATE(A1:A3).
- If any of the arguments is invalid, the CONCATENATE function returns a #VALUE! error.
"&" operator to concatenate strings in Excel
In Microsoft Excel, the ampersand sign (&) is another way to concatenate cells. This method comes in very handy in many scenarios since typing an ampersand is much faster than typing the word "concatenate" :)
For example, to concatenate two cell values with a space in-between, the formula is:
=A2&" "&B2
How to concatenate in Excel - formula examples
Below you will find a few examples of using the CONCATENATE function in Excel.
Concatenate two or more cells without separator
To combine the values of two cells into one, you use the concatenation formula in its simplest form:
=CONCATENATE(A2, B2)
Or
=A2&B2
Please note that the values will be knit together without any delimiter like in the screenshot below.
To concatenate multiple cells, you need to supply each cell reference individually, even if you are combining contiguous cells. For example:
=CONCATENATE(A2, B2, C2)
Or
=A2&B2&C2
The formulas work for both text and numbers. In case of numbers, please keep in mind that the result is a text string. To convert it to number, just multiply CONCATENATE's output by 1 or add 0 to it. For instance:
=CONCATENATE(A2, B2)*1
Tip. In Excel 2019 and higher, you can use the CONCAT function to quickly concatenate multiple cells using one or more range references.
Concatenate cells with a space, comma or other delimiter
In your worksheets, you may often need to join values in a way that includes commas, spaces, various punctuation marks or other characters such as a hyphen or slash. To do this, simply put the desired character in your concatenation formula. Remember to enclose that character in quotation marks, as demonstrated in the following examples.
Concatenating two cells with a space:
=CONCATENATE(A2, " ", B2)
or
=A2 & " " & B2
Concatenating two cells with a comma:
=CONCATENATE(A2, ", ", B2)
or
=A2 & ", " & B2
Concatenating two cells with a hyphen:
=CONCATENATE(A2, "-", B2)
or
=A2 & "-" & B2
The following screenshot demonstrates how the results may look like:
Tip. In Excel 2019 and higher, you can use the TEXTJOIN function to merge strings from multiple cells with any delimiter that you specify.
Concatenating text string and cell value
There is no reason for the Excel CONCATENATE function to be limited to only joining cells' values. You can also use it to combine text strings to make the result more meaningful. For example:
=CONCATENATE(A2, " ", B2, " completed")
The above formula informs the user that a certain project is completed, as in row 2 in the screenshot below. Please notice that we add a space before the word " completed" to separate the concatenated text strings. A space (" ") is also inserted between the combined values, so that the result displays as "Project 1" rather than "Project1".
With the concatenation operator, the formula can be written this way:
=A2 & " " & B2 & " completed"
In the same manner, you can add a text string in the beginning or in the middle of your concatenation formula. For example:
=CONCATENATE("See ", A2, " ", B2)
="See " & A2 & " " & B2
Join text string and another formula
To make the result returned by some formula more understandable for your users, you can concatenate it with a text string that explains what the value actually is.
For example, you can use the following formula to return the current date in the desired format and specify what kind of date that is:
=CONCATENATE("Today is ",TEXT(TODAY(), "mmmm d, yyyy"))
="Today is " & TEXT(TODAY(), "dd-mmm-yy")
Tip. If you would like to delete the source data without affecting the resulting text strings, use the "Paste special - values only" option to convert formulas to their values.
Concatenate text strings with line breaks
Most often, you would separate the resulting text strings with punctuation marks and spaces, as shown in the previous example. In some cases, however, there may be a need to separate the values with a line break, or carriage return. A common example is merging mailing addresses from data in separate columns.
A problem is that you cannot simply type a line break in the formula like a usual character. Instead, you use the CHAR function to supply the corresponding ASCII code to the concatenation formula:
- On Windows, use CHAR(10) where 10 is the character code for Line feed.
- On Mac, use CHAR(13) where 13 is the character code for Carriage return.
In this example, we have the address pieces in columns A through F, and we are putting them together in column G by using the concatenation operator "&". The merged values are separated with a comma (", "), space (" ") and a line break CHAR(10):
=A2 & " " & B2 & CHAR(10) & C2 & CHAR(10) & D2 & ", " & E2 & " " & F2
The CONCATENATE function would take this shape:
=CONCATENATE(A2, " ", B2, CHAR(10), C2, CHAR(10), D2, ", ", E2, " ", F2)
Either way, the result is a 3-line text string:
In the same manner, you can separate final strings with other characters such as:
- Double quotes (") - CHAR(34)
- Forward slash (/) - CHAR(47)
- Asterisk (*) - CHAR (42)
- The full list of ASCII codes is available here.
How to concatenate columns in Excel
To join two or more columns, just enter your concatenation formula in the first cell, and then copy it down to other cells by dragging the fill handle (the small square that appears in the lower right hand corner of the selected cell).
For example, to combine two columns (column A and B) delimiting the values with a space, the formula in C2 copied down is:
=CONCATENATE(A2, " ", B2)
Or
= A2 & " " & B2
For more information, please see How to merge two columns in Excel without losing data.
Combine text and numbers keeping formatting
When concatenating a text string with a number, percentage or date, you may want to keep the original formatting of a numeric value or display it in a different way. This can be done by supplying the format code inside the TEXT function, which you embed in a concatenation formula.
In the beginning of this tutorial, we have already discussed a formula that concatenates text and date.
And here are a few more formula examples that combine text and number:
Number with 2 decimal places and the $ sign:
=A2 & " " & TEXT(B2, "$#,#0.00")
Number without insignificant zeros and the $ sign:
=A2 & " " & TEXT(B2, "0.#")
Fractional number:
=A2 & " " & TEXT(B2, "# ?/???")
To concatenate text and percentage, the formulas are:
Percent with two decimal places:
=A12 & " " & TEXT(B12, "0.00%")
Rounded whole percent:
=A12 & " " & TEXT(B12, "0%")
How to concatenate a range of cells in Excel
Combining values from multiple cells might take some effort because the Excel CONCATENATE function does not accept arrays.
To concatenate several cells, say A1 to A4, you need to use one of the following formulas:
=CONCATENATE(A1, A2, A3, A4)
or
=A1 & A2 & A3 & A4
When combining a fairly small group of cells, it's no big deal to type all the references. A large range would be tedious to supply, typing each individual reference manually. Below you will find 3 methods of quick range concatenation in Excel.
Method 1. Press CTRL to select multiple cells
To quickly select several cells, you can press and hold the Ctrl key while clicking on each cell you want to include in the formula. Here are the detailed steps:
- Select a cell where you want to enter the formula.
- Type =CONCATENATE( in that cell or in the formula bar.
- Press and hold Ctrl and click on each cell you want to concatenate.
- Release the Ctrl button, type the closing parenthesis, and press Enter.
Method 2. Use TRANSPOSE function to get all cell values
When a range consists of tens or hundreds of cells, the previous method may not be fast enough as it requires clicking on each cell. In this case, you can use the TRANSPOSE function to return an array of values, and then merge them together in one fell swoop.
- In the cell where you want the result to appear, enter the TRANSPOSE formula, for example:
=TRANSPOSE(A1:A10)
- In the formula bar, press F9 to replace the formula with calculated values. As a result, you will have an array of values to be concatenated.
- Delete the curly braces surrounding the array.
- Type =CONCATENATE( before the first value, then type the closing parenthesis after the last value, and press Enter.
Note. The result of this formula is static as it concatenates the values, not cell references. If the source data changes, you will have to repeat the process.
Method 3. Use the CONCAT function
In Excel 365 and Excel 2021, this simple formula will concatenate a range of cells in a blink:
=CONCAT(A1:A10)
Method 4. Use the Merge Cells add-in
A quick and formula-free way to concatenate any range in Excel is to use the Merge Cells add-in with the "Merge all areas in selection" option turned off, as demonstrated in Combining values of several cells into one cell.
Excel "&" operator vs. CONCATENATE function
Many users wonder which is a more efficient way to join strings in Excel - CONCATENATE function or "&" operator.
The only real difference is the 255 strings limit of the CONCATENATE function and no such limitation when using the ampersand. Other than that, there is no difference between these two methods, nor is there any speed difference between the CONCATENATE and "&" formulas.
And since 255 is a really big number and you will hardly ever need to combine that many strings in real work, the difference boils down to comfort and ease of use. Some users find CONCATENATE formulas easier to read, I personally prefer using the "&" method. So, simply stick with the technique you feel more comfortable with.
Opposite of CONCATENATE in Excel (splitting cells)
The opposite of concatenate in Excel is splitting the contents of one cell into multiple cells. This can be done in a few different ways:
- Text to Columns feature
- Flash Fill option in Excel 2013 and higher
- TEXTSPLIT function in Excel 365
- Custom formulas to split cells (MID, RIGHT, LEFT, etc.)
You can also find useful information in this article: How to unmerge cells in Excel.
Concatenate in Excel with Merge Cells add-in
With the Merge Cells add-in included in Ultimate Suite for Excel, you can efficiently do both:
- Merge several cells into one without losing data.
- Concatenate the values of several cells into a single cell and separate them with any delimiter of your choosing.
The Merge Cells tool works with all Excel versions from 2016 to 365 and can combine all data types including text strings, numbers, dates and special symbols. Its two key advantages are simplicity and speed - any concatenation is done in a couple of clicks.
Combine values of several cells into one cell
To combine the contents of several cells, you select the range to concatenate and configure the following settings:
- Under What to merge, select Cells into one.
- Under Combine with, type the delimiter (a comma and a space in our case).
- Choose where you want to place the result.
- Most importantly, uncheck the Merge all areas in the selection box. It is this option that controls whether the cells are merged or their values are concatenated.
Combine columns row-by-row
To concatenate two or more columns, you configure the Merge Cells' settings in a similar way but choose to merge columns into one and place the results in the left column.
Join rows column-by-column
To combine data in each individual row, column-by-column, you choose:
- Merge rows into one.
- Use a line break for the delimiter.
- Place the results in the top row.
The result may look similar to this:
To check how the Merge Cells add-in will cope with your data sets, you are welcome to download a fully functional trial version of our Ultimate Suite for Excel below.
That's how to concatenate in Excel. I thank you for reading and hope to see you on our blog next week!
Available downloads
Concatenation formula examples (.xlsx file)
Ultimate Suite 14-day trial version (.exe file)
447 comments
OMG, after trying for an hour to get CONCATENATE to work, I realized that you need to use a semicolon instead of a comma to separate the arguments!
It seems that all guides on this function are wrong in that regard.
Hello!
Our examples use the US regional settings. A comma is used as a separator. You are using a European settings that uses a semicolon. These regional settings are set in the Windows control panel.
Hello,
I am having trouble creating the correct CONC formula for this information. Could you please advise?
Cell Cell Data
B2 C
B3 01
B4 Data Validation- List (only want to include the first character)
B5 Data Validation-List (only want to include the first character)
B6 Data Validation- List (only want to include the first 2 characters)
B7 234
B8 Data Validation-List (only want to include the first character)
B9 21
B11 Formula that will combine cells B2-B9 in order
Thanks,
Daniela
Hello!
I am assuming CONC is CONCATENATE.
Try the following formula:
=CONCATENATE(B2,B3,LEFT(B4,1),LEFT(B5,1),LEFT(B6,1),B7,LEFT(B8,1),B9)
I hope this will help
Hi,
If am using Concatenation then what will be the formula when I have go drag the same for number of rows and columns at time???
Ex. If I have to drag same formula for rows I'll add $ for column number and wise versa.
Them what about doing both draging at a time???
Thanks
Hello!
Please check out the following article on our blog, it’ll be sure to help you with your task: How to copy formula in Excel with or without changing references
I hope it’ll be helpful.
Thanks very much for tutorials, I like to know if there is a way to concatenate my data which is in single column having following format:
Addition Cost 30-
SEP-2005 00:00:00
Addition Cost 31-
OCT-2005 00:00:00
Addition Cost 31-
MAR-2006 00:00:00
Addition Cost 28-
FEB-2007 00:00:00
Reclass Cost 31-MAR-
2007 00:00:00
Addition Cost 31-
MAR-2007 00:00:00
As per format provided all i want is to concatenate every consecutive line before a blank row occurs in the following desired format:
Addition Cost 30-SEP-2005 00:00:00
Addition Cost 31-OCT-2005 00:00:00
Addition Cost 31-MAR-2006 00:00:00
Addition Cost 28-FEB-2007 00:00:00
Reclass Cost 31-MAR-2007 00:00:00
Addition Cost 31-MAR-2007 00:00:00
I have thousands of rows in my data, is there any way that concatenate function can be nested with IF function to concatenate rows between every blank rows.
Thanks in advance if someone can help me please!
Hi, I was wondering if there's a way to concatenate all permutations within 3 columns and let's say 20 rows. So the obvious would be a2+b2+c2, a3+b3+c3 etc... but I also want a2+b3+c2, and a2 +b3 +c4, and a2+b2+c7 etc etc etc. all the way to a20+b20+c20 in all permutations in between. Is there a formula for this?
Is there a way to concatenate cells across multiple rows IF you there is a repeated value in another column? Here's my scenario.
THIS IS MY RAW DATA SET:
COLUMN A COLUMN B
ABC PRODUCT 1
ABC PRODUCT 2
ABC PRODUCT 3
ABC PRODUCT 4
XYZ PRODUCT 1
XYZ PRODUCT 2
XYZ PRODUCT 3
THIS IS THE RESULT I WANT:
COLUMN A COLUMN B
ABC PRODUCT 1; PRODUCT 2; PRODUCT 3; PRODUCT 4
XYZ PRODUCT 1; PRODUCT 2; PRODUCT 3
Thank you in advance for your help.
can you help simple formula like number 12345678879093879, to be =12+34+56+78+87+90+93+87+9 (546) and add "+" every 2 number after but later result sum that all number?
Hello!
You can only convert text to a formula using a VBA macro. You can split these numbers by cells and then find their sum.
Is this how I can replace text in Column B with text in Column A?
For example, Column A has R210#P and Column B has INSERT:IMG_PREMIUM_R210#K_ARTISTLASTNAME.
I want to replace the R210#K in Column B with the R210#P in Column A.
Hello!
If the value R210#P is written in cell B1, then it cannot be changed using an Excel formula. This can only be done with the VBA macro. A cell can contain either a value or a formula. The formula cannot change the value of another cell.
=CONCATENATE(MONTH(Table_Query_form_DMSlink[[#this Row],[ordre Date]]),"/Year(B15)) please explan this
Hello!
Your task is not completely clear to me. It is very difficult to understand a formula that contains unique references to your workbook worksheets. Hence, I cannot check its work, sorry. Please specify what you were trying to find, what formula you used and what problem or error occurred.
How do I concatenate a name and phone number (different cells)
Sheet1!I1= Jane Dow
Sheet1!J1 = (000) 000-0000
Into one cell to read
Jane Doe (000) 000-000
Hello!
Pay attention to the following paragraph of the article above Concatenate cells with space
i need to know after 5 digit how put -ve sign 921023E550 ( example 92102-3E550 )
please inform us the formula
Hello!
If I understand your task correctly, the following formula should work for you:
=LEFT(F1,5)&"-"&RIGHT(F1,LEN(F1)-5)
Hope this is what you need.
I am trying to concatenate two separate data sets where all the data in A get's repeated for each cell in B. Is there a way to concatenate this without manually changing the $ for each cell in the concatenate function?
example:
Origin Zone Destination Zones
BTD-TGD 32218
NOD-BBK 90670
NOD-BBK-BTD 90749
The result I am looking for is:
BTD-TGD_32218
NOD-BBK_32218
NOD-BBK-BTD_32218
BTD-TGD_90670
NOD-BBK_90670
NOD-BBK-BTD_90670
And so on. Currently the only way I know to do this is =CONCATENATE(A1,"_"b$2) and then change to (...b$3) when all of the data for b2 has been completed.
Hello!
We have a tool that can solve your task in a couple of clicks: Ablebits Tools- Create Cards.
If your data is written in 3 columns -
aaa bbb ccc
123 123 123
456 456 456
789 789 789
and set Number of columns to 1 and "Add header"б
then we get the result -
aaa 123
bbb 123
ccc 123
aaa 456
bbb 456
ccc 456
aaa 789
bbb 789
ccc 789
This tool is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and use for free: https://www.ablebits.com/files/get.php?addin=xl-suite&f=free-trial
If you have any (other) questions, don't hesitate to ask.
I am building a list for a team to use that has unique hyperlinks in each row of data. I have attempted to use concatenate to add the active link to a sentence of text. Simply using concatenate, the link does not stay active. Using & the entire text becomes an active link. Is there another operator I should be adding?
Hello!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
Need help...
What if i want to concatenate in excel then i also want to add a open expression
Column A = 2+1
Column B = Roses
Column C = Concatenate(A&" "&B)
Result currently as 2+1 Roses but what i need to know is how can i covert it automatically to 3 Roses
Thanks in advance
Hello!
Cell A1 now contains the text "2 + 1". If you change it to the formula = 2 + 1, then you will get the desired result.
a1
a2 a20
how we drag a20 by using concatenate pls help
Hi,
How to auto concatenate a RANGE of Cells before space:
List 1 List 2 Concated list
AA MM MM
CC PP PP QQ
CC QQ
DD TT TT MM NN
DD MM
DD NN
thank
Hello Svetlana,
"Excellent" also can not describe the good work you have done and it's being explained in such a easy manner even a layman will become an expert in Excel.
Great work keep it up.
God bless you.
Cheers,
Yogesh
HI I am trying to work out the following formatting and was hoping you could help.
If I have a range of 90% to 100% in a cell K5 in the next cell K6 I would like it to say excellent
but if in that cell I have a range of 80% to 89% I would like it to say very good.
basically its a if this then that... but not with colors with specific text.
Hello Alexander,
I have a number of cells to concatenate in order to generate an unique identifier for each line item.
The cells contain, for example - A2: 200729, B2: SNK, C2: 34543
My formula reads: =concatenate(right(A2,3),"-",B2,"-",left(C2,2)) producing 729-SNK-34
In cell A2, I would like to use the second digit "0" at the beginning of the unique identifier, so need to skip the first digit in cell A2 and use the second, while the rest of the formula stays the same....so the result should then read 0729-SNK-34. Is that possible please...and thank you!
Hello!
If I understand your task correctly, the following formula should work for you:
=CONCATENATE(REPLACE(A2,1,2,""),"-",B2,"-",LEFT(C2,2))
I hope this will help
Is there a way to exclude two specific characters whenever they appear in the cells that you are combining? Either using CONCATENATE or any other function. For example:
A2 thru A5 all have the same data: AA .
B2 thru B5 have: T-14 T-14+ T-14= T-14++= in which the hyphen, plus sign, and equals sign are not actually mathematical, but rather are part of the "model number" (no idea why). That is, they are just textual, not math.
C2 thru C5 have the data: 22 33 44 55.
I need to place the letter X then Cell A then Cell B then Cell C together, eliminating any plus signs or equals (remember, they are not mathematical). The hyphens can stay.
I tried this: =("X"&A5&(SUBSTITUTE(B5,"+",""))&C5)
It of course doesn't eliminate the "=" symbol. I get the result I want for Rows 2 and 3, for example XAAT-1422, XAAT-1433. And not the result that I want for Rows 4 and 5, which return these results: XAAT-14=44, XAAT-14=55.
And vice versa if I use =("X"&A5&(SUBSTITUTE(B5,"=",""))&C5)
I get my desired result for Rows 2 and 4 (XAAT-1422, XAAT-1444) but not for rows 3 and 5, which return XAAT-14+33 and XAAT-14++55.
So I want to be able to eliminate all + symbols and = symbols. I know this scenario is odd to use these symbols, and not mathematically, but the manufacturer uses them in model naming. Thank you for any help! I had started with a concatenate function but couldn't get it to work for me either.
Clarification as the spacing above makes it hard to read what I intended:
B2 thru B5 have:
T-14
T-14+
T-14=
T-14++=
in which the hyphen, plus sign, and equals sign are not actually mathematical, but rather are part of the "model number" ..
Hello Jillian!
If I understand your task correctly, the following formula should work for you:
="X"&A2&SUBSTITUTE(SUBSTITUTE(B2,"=",""),"+","")&C2
or
=CONCATENATE("X",A3,SUBSTITUTE(SUBSTITUTE(B3,"=",""),"+",""),C3)
I hope it’ll be helpful.