CONCATENATE in Excel: combine text strings, cells and columns

In this tutorial, you will learn various ways to concatenate text strings, cells, ranges, columns and rows in Excel using the CONCATENATE function and "&" operator.

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 that require concatenation in Excel 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 that you can choose the method best suited for your worksheets.

What is "concatenate" in Excel?

When you merge cells, you "physically" merge 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 in your worksheet.

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 our next article, and in this tutorial we will tackle two essential ways to concatenate strings in Excel - by using the CONCATENATE function and the Excel & operator.

Excel CONCATENATE function

The CONCATENATE function in Excel is designed to join different pieces of text together or combine values from several cells into one cell.

The syntax of Excel CONCATENATE is as follows:

CONCATENATE(text1, [text2], …)

Where text is a text string, cell reference or formula-driven value.

Below you will find a few examples of using the CONCATENATE function in Excel.

Note. In Excel 2016, Excel 2019, Excel Online and Excel Mobile, CONCATENATE is replaced with the CONCAT function, which has exactly the same syntax. Although the CONCATENATE function is kept for backward compatibility, it is recommended to use CONCAT instead because Microsoft does not give any promises that CONCATENATE will be available in future versions of Excel.

Concatenating the values of several cells

The simplest CONCATENATE formula to combine the values of cells A1 and B1 is as follows:

=CONCATENATE(A1, B1)

Please note that the values will be knit together without any delimiter, as in row 2 in the screenshot below.

To separate the values with a space, enter " " in the second argument, as in row 3 in the screenshot below.

Concatenating a 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 concatenate various text strings to make the result more meaningful. For example:

=CONCATENATE(A1, " ", B1, " 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.

Naturally, you can add a text string in the beginning or in the middle of your Concatenate formula as well:

=CONCATENATE("See ", A1, " ", B1)

A space (" ") is added in between the combined values, so that the result displays as "Project 1" rather than "Project1".

Concatenating a text string and a formula-calculated value

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:

=CONCATENATE("Today is ",TEXT(TODAY(), "dd-mmm-yy"))

Using CONCATENATE in Excel - things to remember

To ensure that your CONCATENATE formulas always deliver the correct results, remember the following simple rules:

In a single CONCATENATE 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.

Excel CONCATENATE does not recognize arrays. Each cell reference must be listed separately. For example, you should write =CONCATENATE(A1, A2, A3) instead of =CONCATENATE(A1:A3).

If at least one of the CONCATENATE function's arguments is invalid, the formula returns a #VALUE! error.

"&" operator to concatenate strings in Excel

In Microsoft Excel, & operator is another way to concatenate cells. This method come in very handy in many scenarios because typing the ampersand sign (&) is much quicker than typing the word "concatenate" :)

Similarly to the CONCATENATE function, you can use "&" in Excel to combine different text strings, cell values and results returned by other functions.

Excel "&" formula examples

To see the concatenation operator in action, let's re-write the CONCATENATE formulas discussed above:

Concatenate a string and the result of the TEXT / TODAY function:="Today is " & TEXT(TODAY(), "dd-mmm-yy")

As demonstrated in the screenshot below, the CONCATENATE function and "&" operator return identical results:

Excel "&" operator vs. CONCATENATE function

Many users wonder which is a more efficient way to concatenate strings in Excel - CONCATENATE function or "&" operator.

The only essential difference between CONCATENATE and "&" operator is the 255 strings limit of the Excel CONCATENATE function and no such limitations when using the ampersand. Other than that, there is no difference between these two concatenation methods, nor is there any speed difference between the CONCATENATE and "&" formulas.

And since 255 is a really big number and in real-life tasks someone will hardly ever need to combine that many strings, the difference boils down to the comfort and ease of use. Some users find CONCATENATE formulas easier to read, I personally prefer using the "&" method. So, simply stick to the concatenation technique that you feel more comfortable with.

Concatenate cells with a space, comma and other characters

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 include the character you want 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(A1, " ", B1) or =A1 & " " & B1

Concatenating two cells with a comma:

=CONCATENATE(A1, ", ", B1) or =A1 & ", " & B1

Concatenating two cells with a hyphen:

=CONCATENATE(A1, "-", B1) or =A1 & "-" & B1

The following screenshot demonstrates how the results may look like:

Concatenate text strings with line breaks

Most often, you would separate the concatenated text strings with punctuation marks and spaces, as shown in the previous example. In some cases, however, may 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, and therefore a special CHAR function is needed to supply the corresponding ASCII code to the concatenation formula:

On Windows, use CHAR(10) where 10 is the ASCII code for Line feed.

On the Mac system, use CHAR(13) where 13 is the ASCII 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

Note. When using line breaks to separate the concatenated values, you must have the "Wrap text" option enabled for the result to display correctly. To do this, press Ctrl + 1 to open the Format Cells dialog, switch to the Alignment tab and check the Wrap text box.

In the same manner, you can separate concatenated 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

Though, an easier way to include printable characters in the concatenation formula is to simply type them in double quotes as we did in the previous example.

Either way, all four of the below formulas yield identical results:

=A1 & CHAR(47) & B1

=A1 & "/" & B1

=CONCATENATE(A1, CHAR(47), B1)

=CONCATENATE(A1, "/", B1)

How to concatenate columns in Excel

In order to concatenate two or more columns in Excel, you just enter a usual 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 concatenate two columns (column A and B) separating the values with a space, you enter the following formula in cell C2, and then copy it down to other cells. When you are dragging the fill handle to copy the formula, the mouse pointer changes to a cross, as shown in the screenshot below:

Tip. A quick way to copy the formula down to other cells in the column is to select the cell with the formula and double-click the fill handle.

Please note that Microsoft Excel determines how far to copy cells after the fill handle double click based on the cells referred to by your formula. If there happen to be empty cells in your table, say cell A6 and B6 were blank in this example, the formula would be copied up to row 5 only. In this case, you would need to drag the fill handle down manually to concatenate the entire columns.

An alternative way to concatenate columns in Excel is to use the corresponding option of the Merge Cells add-in.

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 and requires a single cell reference in each argument.

To concatenate several cells, say A1 to A4, you need either of the following formulas:

=CONCATENATE(A1, A2, A3, A4)
or

=A1 & A2 & A3 & A4

When joining a fairly small range, it's no big deal to enter all the references in the formula bar. A large range would be tedious to add, typing each cell reference manually. Below you will find 3 methods of quick range concatenation in Excel.

Method 1. Press CTRL to select multiple cells to be concatenated

To quickly select several cells, you can press the CTRL key and click on each cell you want to include in the CONCATENATE 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 in the formula bar and press Enter.

Note. When using this method you must click each individual cell. Selecting a range with the mouse would add an array to the formula, which the CONCATENATE function does not accept.

Method 2. Use the TRANSPOSE function to get the range

When you need to concatenate a huge range consisting of tens or hundreds of cells, the previous method is not fast enough because it requires clicking on each cell. In this case, a better way is to use the TRANSPOSE function to return an array, and then replace it with individual cell references in one fell swoop.

In the formula bar, press F9 to replace the formula with calculated values.

Delete the curly braces that turn a usual Excel formula into an array formula. As a result, you will have all the cells references to be included in your concatenation formula.

Type =CONCATENATE( in front of the cell references in the formula bar, type the closing parenthesis and press Enter.

Note. Whichever method you use, the concatenated value in C1 is a text string (notice its left-alignment in the cell), although each of the original values is a number. This is because the CONCATENATE function always returns a text string regardless of the source data type.

Concatenate numbers and dates in various formats

When you concatenate a text string with a number or date, you may want to format the result differently depending on your dataset. To do this, embed the TEXT function in your Excel concatenate formula.

The TEXT(value, format_text) function has two arguments:

In the first argument (value), you supply a number or date to be converted to text, or a reference to the cell containing a numeric value.

In the second argument (format_text), you enter the desired format using the codes that the TEXT function can understand.

Merge Cells add-in - formula-free way to concatenate cells in Excel

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 2003 to 2016 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. And now, let me show it to you in action.

Combine the 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:

Cells into one under "What to merge";

Select the delimiter you want under "Separate values with", it's a comma and a space in this example;

Choose where you want to place the result, and most importantly

Uncheck the "Merge all areas in the selection" option. It is this option that determines whether the cells are merged or the cells' 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 Columns under "What to merge":

Join rows column-by-column

To combine data in each individual row, column-by-column, you choose to merge Rows, select the delimiter you want (line break in this example), configure other settings the way you want and hit the Merge button. 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. And if you are happy with the result, you may want to buy helpful tool as a separate product or as part of our Ultimate Suite for Excel, which includes 60+ other time-saving tools for most common Excel tasks. Either way, we will happily offer you the 15% off coupon code that we've created especially for our blog readers: AB14-BlogSpo.

Column 2 has the Embed code which has the Video ID after "embed/" that appears at the end after the "/" in Column 1.

It is same for all the videos and I've to maintain a sheet of Thousands of them!
So far I've been copying and pasting both from the YouTube videos but would love to know if it's possible to merge the partial text(ID) from column 1 in the middle of the text in Column 2.

Hi there
How can the last cell in a column filled from the first cell will automatically minus
for example IN column A when in a2 was a number a2 - a1 and if in A3 was number A3 - A1 only the last fill cell minus first cell and write Answer in A10

The problem is caused by the fact that your number is not entered into the cell with a $ symbol, etc. but the cell itself is formatted as currency (the actual cell content is just 2250.38 which is why the $ does not show when concatenating). The following will work:

hi, i am sonai.i have one question please answer it.
the format of the EXCELL is,
ADDRESS1 ADDRESS2 ADDRESS3 ADDRESS4 CITY STATE PINCODE
so, split the address to this format,
the source data is
oldno54,newno4355,eaststreet,virudhunagar,mutharpatti,greengarden,chennai,tn,tamilnadu,600018
please, solve the problem.it's my humble request youto.immediately

Hi All, This is my actual formula =IF(F$1,'Apr-2016'!J16,"") "Apr-2016" is the name of the sheet in the workbook, i would like to use concatenate so I can choose the year (2016) from another cell. please help many thanks

Although this question was a bit more than a year ago, I too was attempting to figure this out and landed here. Excel can natively do a find of this information. With the native find window open select "Options<<" from there make sure you select Look in: "Values". The default is "Formulas" however this will not produce the results you are looking for. Hope this helps someone.

I have an excel table (C4:O12) that sums values W-L-T (win-loss-tie) records both horizontally and vertically when entering a "W", "L", or "T" in each cell in table with a resulting "0-0-0" format. I have the totals with this format in bottom row from C13:O13 as well as in column from P4:P12 Here are the following formulas Ive used:

would it be possible for you to send us a sample workbook with your data and formulas you're using to support@ablebits.com? Don't forget to include the link to this comment.
We'll look into the way your data is stored and try our best to help.

1- Select the cell where you need the result.
2- Go to formula bar and enter data range ex. =TRANSPOSE(A1:A5)&” “
3- Based on your regional settings, you can also try =A1:A5 (instead of =TRANSPOSE(A1:A5)).
4- Select the entire formula and press F9 (this converts the formula into values).
5- Remove the curly brackets from both ends.
6- Add =CONCATENATE( to the beginning of the text and end it with a round bracket).
7- Press Enter

Hello,
For me to understand the problem better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.
Please also don't forget to include the link to this comment into your email.
I'll look into your task and try to help.

2. If you use Excel 2016, then you can try this array formula:
=CONCAT(CONCATENATE(A1:A3,","))
Please don’t forget to press Ctrl + Shift + Enter to complete it. Once you do this, Excel will automatically enclose the formula in {curly braces}. In no case should you type the curly braces manually, the formula won't work.

I have 2 columns Singer 1 and singer 2. I want to concatenate with comma separator. However in some rows only Singer 1 Values are available and if there is no value in singer 2 - I dun want the comma separator to be posted since there is a single value.

I'm combining number cells. One of the number cells is formatted special to show three digits (000). But when I combine them the first zeros disappear. So, 001 in that cell needs to be displayed as 001 (which is exactly the number in that cell) not as 1 (single digit).

How do I combine them and still keep my cell formatting the same.
Thanks

How can change names in single cell of a spread sheet from lastname, firstname
entered just like that, with a comma. I want to cell to give me the names firstname lastname with no comma. Is that possible?

Thank you for this excellent guide. I have a series of concatenated sentences each with text intermixed with values (numbers) pulled from other cells. In some cases, I have used the TEXT function to render the desired number format. However, I am looking to make the values (whether or not with the TEXT function) to pop out of the surrounding text in a contrasting colour. How can I format it to do this? I was hoping the TEXT function would enable this, but cannot see how. Thank you.

Please note that the TEXT function does not support color formatting. So if you copy a number format code from the Format Cells dialog that includes a color, e. g. $#,##0.00_);[Red]($#,##0.00), the TEXT function will accept the format code, but it won't display the color.

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.

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

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))

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 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)

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 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

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/

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.

Hi there,
How to concatenate two columns that mimic this (N'Doe, John', N'Doctor') where Doe, John is the first column and Doctor is the second column. This (N'Doe, John', N'Doctor') has to be used in SQL and XML. Thanks

I need to concatenate a few cells but A2 it's a number 08 and I need the zero in front, but for some reason it's only showing the number 8 alone, same with all the single digits like 4 it should be 04. For the 2018 I need only the 18 but it's giving me the complete year.

I'm trying to concatenate two columns of data. One contains area codes for phone numbers, and the second column contains the numbers themselves. The problem is that when the phone number begins with a zero, this isn't included in the final concatenated value, resulting in nonviable phone numbers. How can I go about fixing this?
Thanks

Hanelise:
If you want to keep the leading zeros, you just need to format the cells as Text before entering the data. This should be OK for you because when you concatenate the cells they will go to text anyway.

Hello, Hanelise,
If we understand your task correctly, please have a look at our Merge Cells Wizard. It allows you to combine several cells into one without loosing symbols.
You can install a fully functional 7-day trial version of Merge Cells Wizard and see if it works for you. Here is the direct download link.
Feel free to contact us again if you have any questions or need further assistance.

In Excel, select the cell with your CONCAT formula, and press Ctrl+C to copy it. Switch to your Word document, place the mouse pointer to where you want the merged text to appear and press Ctrl+V to paste it.

Post a comment

Unfortunately, due to the volume of comments received we cannot guarantee that we will be able to give you a timely response. When posting a question, please be very clear and concise. We thank you for understanding!