Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Using the CONCATENATE Worksheet Function.

Using the CONCATENATE Worksheet Function

by Allen Wyatt
(last updated January 10, 2015)

16

Excel provides a function called CONCATENATE which can be used to combine the contents of several cells, or even to combine cell contents with other text. For instance, let's say you wanted to add together the contents of cells A3 and B3, separate them by a space, and have the result appear in cell C3. All you need to do is put the following formula in cell C3:

=CONCATENATE(A3," ",B3)

Primarily, the CONCATENATE function is used for compatibility with other (older) spreadsheet programs. You can just as easily use the ampersand (&) operator to combine text values using a formula. For instance, the following is equivalent to the example of CONCATENATE shown above:

=A3 & " " & B3

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9933) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Using the CONCATENATE Worksheet Function.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Inserting Signature Lines

How to create signature lines in a Word document.

Discover More

Scrolling Up and Down

Need an easy way to move through a spreadsheet using a mouse? Here are a couple of ideas.

Discover More

Spell-Check Won't Work

Having problems making spell check work on a portion of your document? There are two primary causes for such an occurrence, ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Using the REPT Function

Excel includes a handy function that allows you to repeat characters or strings of characters. How you use the REPT function ...

Discover More

Returning the MODE of a Range

The MODE function is used to determine the most frequently recurring value in a range. This tip explains how to use the ...

Discover More

Phantom Counts

Two common worksheet functions used to count things are COUNT and COUNTA. Not understanding how these functions treat cell ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 9 + 4?

2015-01-21 09:17:56

awyatt

Do you really want to get into that argument again, Brian?

You said "...the terms of excelribbon.tips that state that comments become the property of excelribbon.tips." There is no such statement in our terms. I provided a link to our actual terms, or anyone can click on the "Commenting Terms" link at the bottom of this (or any) page.

The closest to what you suggest is our term #5 which states that "...you grant us the right to use your comment in any way we see fit, with or without attribution or remuneration, at our sole discretion."

You state that you chose LinkedIn to post your substantive comments because of our terms. However, the commenting policies at LinkedIn (as I provided a link for) are materially the same as ours.

So how are you wrong? Two ways. First, our commenting terms don't include the wording you indicate. Second, you are wrong in your inference that commenting policies are somehow less onerous at other sites, such as LinkedIn.

Does that help?

-Allen


2015-01-21 09:05:27

Brian Canes

"Brian is wrong in his statement"
@Allen, please advise what specifically is wrong.
Regards
Brian


2015-01-20 08:46:50

Michael (Micky) Avidan

@Dennis,
Are you sure about the ’comma’ ?
To my opinion it should be an equation sign (=).
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2015)
ISRAEL


2015-01-19 13:49:33

Dennis Costello

The simplest answer to Brian L.'s task seems to be
{=AND(A1:A50,R1:R50)}

i.e., enter as an array formula using the infamous Ctrl-Shift-Enter sequence.

This doesn't address Andrew's original topic of concatenating multiple cells - instead it sidesteps it.


2015-01-13 15:09:07

Brian L.

Great stuff, folks! The use of F9 to convert the range into array values as a starting point is a brilliant trick. I couldn't quite figure out why TRANSPOSE is necessary, though -- it works fine for me just skipping to the F9 step. Thanks again, all -- Brian Canes, your detailed (understatement!) explanations were very interesting and helpful -- "You see, you didn't stop me" -- LOL! And the summary by Abhilash VK at exceltoxl.com was also great.


2015-01-13 10:24:34

Michael (Micky) Avidan

To those who like add-ons may install the MOREFUNC add-on and use the: MCONCAT Function.
Others – who want to spare all the struggling with a "HUGE" formula and assume you have 22(!) cells, across a row, with data and you need to concatenate then into a single cell, with comma-separators – try the following:
* In Cell W1 type: =JoinCells(A1:V1,", ") after you entered the following VBA Code into a VBE Module:
---------------------------------------
Function JoinCells(Rng As Range, Optional Sep As String)
For Each CL In Rng
If CL > "" Then JoinCells = JoinCells & Sep & CL
Next
JoinCells = Mid(JoinCells, Len(Sep) + 1)
End Function
----------------

Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2015)
ISRAEL


2015-01-12 09:56:48

awyatt

"Maybe I should read things before agreeing to them"

Balthamossa: If you did read them, you would find out that Brian is wrong in his statement. The terms (specifically term #5) says that we can use your comment.

There is no material difference between this and the terms at LinkedIn, which Brian seems to prefer. There they say that the user grants LinkedIn "worldwide, transferable and sublicensable right to use, copy, modify, distribute, publish, and process, information and content that you provide through our Services, without any further consent, notice and/or compensation to you or others."

As a general rule, I at least provide a "thanks" note in my newsletters when I incorporate comments into a later version of a tip. That's more than LinkedIn would do, based on their own terms.

-Allen


2015-01-12 08:44:14

RF

Brian, would this work if I used my ring finger instead of my pinkie?


2015-01-10 13:17:57

balthamossa2b

"So these tips are not party to the terms of excelribbon.tips that state that comments become the property of excelribbon.tips. "

...Maybe I should read things before agreeing to them.




2015-01-10 12:45:37

Brian Canes

@Brian L.
I have ways. If you want you can email me at brian@canes.net
Regards
Brian


2015-01-10 12:40:05

Brian Canes

To: Brian L. and others
Please see my extensive posts in the LinkedIn thread http://bit.ly/ConcatIon
Note: you may need to join LinkedIn and you may need to join the ExcelHero group.
There are 4 or so comments by me - they are progressive, with more and more ways to formularize concatenations. There is also a VBA version.
Regards
Brian

Technical note: I am supplying a link, not the actual tips. So these tips are not party to the terms of excelribbon.tips that state that comments become the property of excelribbon.tips


2015-01-10 12:26:15

Brian Canes

Is using & necessarily an 'easier' way than concatenate?
Suppose you had 5 cells to concatenate.
Type =con Tab
gets you =concatenate(
then holding the Ctrl key down with your left pinkie all the way, left mouse click on A1 then click A2 click A3 click A4 click A5 Enter gets
=CONCATENATE(A1,A2,A3,A4,A5) [note keep ctrl down through enter]
Then CtrlH Find what , Replace with ," ", Replace gives you
=CONCATENATE(A1," ",A2," ",A3," ",A4," ",A5)
Note: in the Find and Replace Dialog Match entire cell contents must be off.
Summary 14 keys 6 clicks: =con tab ctrl hold click click click click click Enter ctrl H , " space " , click
Using &
Summary 12 keys 6 clicks: = Ctrl hold click click click click click Enter Ctrl H , &" space "& click
So & wins by 2 keystrokes
Now suppose you do not have hardcoded separators and 5 cells to concatenate
7/5 =con tab ctrl hold click click click click click Enter
8/6 = ctrl hold click click click click click Enter ctrl H , & , click
So Concatenate wins by 2, a click and a tap
Conclusion - if you use the pinkie hold technique there is little difference in effort either way.
Regards
BBrian


2015-01-10 12:00:30

Jason Swartzlander

"Flash Fill" is available in Excel 2013 and is a more efficient way of accomplishing this. It is a really nice tool!


2015-01-10 11:46:19

Duane Hookom

There is an article with discussions on the related site http://excel.tips.net/T003062_Concatenating_Ranges_of_Cells.html.


2015-01-10 10:46:11

balthamossa2b

@Brian

Googling around I found this: http://chandoo.org/wp/2014/01/13/combine-text-values-quick-tip/

Nice trick, didn't know about it.


2015-01-10 10:19:50

Brian L.

I wonder if there's an easy formula to concatenate a large range of cells? For instance, I have a sheet where I compare the text in about 50 cells in one row to the corresponding 50 cells in another. I used:
=CONCATENATE(A1,A2,A3,...,A50) = CONCATENATE(R1,R2,R3,...,R50)
It works, but it's tedious to type/click. The SUM-like format of CONCATENATE(A1:A50) doesn't work. Of course, a macro would do the trick, but I'd prefer a formula in this case. Ideas?


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.