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
Hi
Hello Sir/Madam,
plz solve my problem that how to write many dates in a cell in excel sheet since a have a range of dates for example here Mr. Ram has taken 6 spells leave in a month as
SN NAME DAYS FROM DATE TO DATE
1. Mr.Ram 5 07/05/2018 11/05/2018
2 18/05/2018 19/05/2018
3 21/05/2018 23/05/2018
2 25/05/2018 26/05/2018
2 28/05/2018 29/05/2018
1 31/05/2018 blank
2. Mr.Paul 1 02/05/2018
3 05/05/2018 07/05/2018
2 11/05/2018 12/05/2018
1 15/05/2018
3. Mr.Mac 3 18/05/2018 20/05/2018
3 26/05/2018 28/05/2018
4. Mr.Bond 7 23/05/2018 29/05/2018
sir/madam,
i want to write all DAYS in a cell like above and all FROM DATE in a cell like above and also TO DATE in a cell like above.
sir i want that if there is only two spells of leave of an employee there shows only two lines in cell and if there is three spells of leave of an employee then there shows only three lines in cell AND if there is only on day of leave then shows in only from date cell and to date will blank as shown in 6th spell as 1 day 31/05/2018.
please HELP ME SIR/MADAM
NL01AB1895
i just want above result as per below give.
1895_NL_01_AB
Also, i want a particulars word search in a column in excel.
So, Please guide us.
hi
i have number of say 100 links in which i need to edit 4 letters
eg: http://www.google.com/node12346 (is source)
http://www.google.com/in-en/node12346 (as result)
how do i do it using concatenate formula
Hi Drishti,
I'd simply use Excel's Replace All feature:
1. Press the Ctrl + H to open the Replace tab of the Find and Replace dialog.
2. Type /node in the "Find what" box.
3. Type /in-en/node in the "Replace with" box.
4. Hit "Replace All".
Done.
How to do?
32
12
32
32
32
92
36
192
96
36
24
32
32
32
100
32
32
384
32
32
to this
32,12,32,32,32,92,36,192,96,36,24,32,32,32,100,32,32,384,32,32
(in one shot without using one by one concatenation) .
Manisha:
I use the Concatenate Transpose method on the infrequent occasions I have done this. I decided to look for other methods to answer your question and came across this excellent article on five different methods to accomplish your task. Take a look at the article and I know you will find a method that best suits your situation.
https://excelchamps.com/blog/concatenate-a-range-of-cells/
I am trying to reference other cells in excel that have formulas for an API. The following formula works: =RTD($B$1,,"srpt//OPT/20180629/p/137/USD", "Bid")
But when I replace certain parts with referencing, it does not work:
=RTD($B$1,,"B4//opt/$H$2/p/G4/usd","bid")
How do I fix this?
Kind Regards,
Liviu
It's very usefull. Thanks !
All the things very nice....I were looking for concatenate function with carriage return and my luck & pleasure that I visited this page :)
Got a very nice and easy solution.
Thank you.
hi svetlana will you assist me to make letter lower case to uppercase formula for example I want" formula" text " rmul only to uppercase mean ruml lowercase to upper case RUML thank you
Paban:
Where the original text is in A1
Enter =UPPER(A1) in an empty cell.
The function has an expanded explaination in the article above.
I have a large data that are over 13K rows, I want to combine all of them into one cell. I know you can only have 8192 characters in an Microsoft Excel cell. I want to know if anyone know how to create a VBA macro or better way to have a formula that can do the job. Right now each cell has 9 characters in each cell so I am combining about 3200 cell at once, but I have to do this over and over again until i finish all my 13K records. I need to separate them by comma (,).
For example: 123456789,123456789,123456789,123456789
That is how I want it but I know I could only do 3200 records at a time.
My original records looks like this:
123456789
123456789
123456789
I may not know the right word to use pls pardon me:
My name is Apple
Joy
Peace
goodness
love
sound
mind
I want Column 1(My name is) to be linked with each of the Column 2 (name list) above in a new column(Column 3) Thanks
I want to use a concatenation formula. Pulling information for several cells the cells either have a date for example cell F4 or are left blank. I want the formula to pick up the date or put in “no date at this time” and I’m not sure how to make the formula work.
I want to use a concatenation formula. Pulling information for several cells the cells either have a date for cell F or are left blank. I want the formula to pick up the date or put in “no date at this time” and I’m not sure how to make the formula work.
Elizabeth:
Will this work?
Test to see if cell is empty, if it is then return "No Date At This Time", otherwise return the cell's contents.
Where the data is in cell A18, it looks like this:
=IF(ISBLANK(A18),"No Date at this time",A18)
Mr.Doug
Thank you for reply
but i want result is 010155
this result is 1155
That sounds like a cell formatting issue.
Select the cells and choose format cells and then choose custom and use one of the provided formats or use one as a starting point and then change it to the format you want.
I want to concat A1 cell value 01
B1 cell value 05
c1 cell value 5
how to concat
I want result d1 cell 01055
Please reply me
D1=Concatenate(A1,b1,c1)
COL1 COL2
1 AAA
1 GGG
1 FFF
2 GGG
2 HHH
3 RRR
3 JJJ
concatenate text based on criteria in Excel? FORMULAS
Not sure what the criteria is, but here's a way to do this.
If numbers are in cells A1 through A10 and letters are in cells B1 through B10 and your criteria is if a cell contains a "1" then:
=IF(OR(A1=1,A2=1,A3=1,(Concatenate(B1," ",B2," ",B3))
thanks for the support
Thank you!
While I'm pretty sue, that there is an easier way to do what I need (replace input value with text including said value), probably even in single column (yet no tutorial, how to do that, with concatenate function I achieved my goal:
=CONCATENATE("OAM-";C2;"/PP-2017")
And even expanded it for future use (albeit at the cost of 2 extra columns *sad*):
=CONCATENATE("OAM-";C2;"/";D2;"-201";E2)
Result (where XXXXX is the input number):
OAM-XXXXX/PP-2017
Hello!
How do I concatenate based a number such as...
N = 5
String = "Hello"
Desired output = "xxxxxHello"
N = 3
String = "Hello"
Desired output = "xxxHello"
Thanks
here is one i am trying to do...
I have a pricing matrix and i have named each cell in the matrix by its location within the matrix, example...
A1=ABa1, B1=ABa2, C1=ABa3
A2=ABb1, B2=ABb2, C2=ABb3
A3=ABc1, B3=ABc2, C3=ABc3
so on another sheet i have my products that are coded with these name. example...
Product A: S1234a1
Product B: S4567b4
i want to strip that "a1" off the end and then use it in the formula to show the price for ABa1.
I use "RIGHT" formula to grab the 'a1' text, and then i use CONCATENATE with plain AB text to create the value ABa1 displayed in the cell. so thats great i can see a string on data that is exactly what i want
so heres my dilemma...
in any cell, if i manually type in "=ABa1", it refers to the cell which i named ABa1 and the value within that cell is displayed. makes sense works perfect...
but what i want to do is use my CONCATENTATED string of data, rather that actually keying in the my "=ABa1".
somehow like this....=(the concatenated data string i want use), and then will have the same affect as when i manually key it in.