Concatenate a cell range without vba in excel
Filed in Excel on Feb.09, 2011. Email This article to a Friend
Joining many text strings in excel is not easy. The Concatenate function accepts only a single cell reference in each argument.
Example,
=Concatenate(A1, A2, A3) + ENTER
To quickly select cells you can press CTRL and click on cells you want to be included in the concatenate function.
Example,
- Select a cell
- Type =concatenate( in formula bar
- Press and hold CTRL button and click cells to be included.
- Release CTRL button
- Type ) in formula bar and press Enter
The above example works if you don´t have so many cells to add. A large range would be tedious to add, clicking on each cell.
Concatenate a cell range
Here is a larger range, A1:A50 with some values.
Let´s concatenate these values:
- Select cell B1.
- Type =A1:A50 in formula bar.
Edit: Depending on your regional settings, try this: =TRANSPOSE(A1:A50) - Press F9.
- Delete curly brackets in formula bar.
- Type =Concatenate( in front of all characters in formula bar.
- Type ) at the end in formula bar.
- Press Enter
Formula in cell B1:
=CONCATENATE("A1","B1","C1","D1","E1","F1", ...) + ENTER
Create delimiting character
It would be great if we could have a character separating values. Here is how:
- Select cell B2.
- Type =A1:A50&", " in formula bar.
Edit: Depending on your regional settings, try this: =TRANSPOSE(A1:A50)&", " - Press F9.
- Delete curly brackets in formula bar.
- Delete last delimiting character.
- Type =Concatenate( in front of all characters in formula bar.
- Type ) after last character in formula bar.
- Press Enter
Formula in cell B2:
=CONCATENATE("A1, ","B1, ","C1, ","D1, ","E1, ","F1, ", ...) + ENTER









February 13th, 2011 at 11:59 am
Wont work.
A1:A50 will return a row array.
You will need to type =transpose(a1:a50) in cell b1 , say f9, delete the curly brackets and type concatenate
February 13th, 2011 at 12:39 pm
Sam,
Thanks for commenting!
It works with my regional settings in excel 2007.
February 13th, 2011 at 12:48 pm
Oscar, In the English version the row array has a ; as a separator and a column array has a , as a separator.
=A1:A10 give ={"name1";"name2";.....;"name10"} etc
February 13th, 2011 at 9:35 pm
Great tip, Oscar. Surprised that Microsoft didn't fix this in the Excel 2010, but go figure. Sam, I think I had the same problem as you and I was running the evaluate (F9) by selecting just the range and not the full TRANSPOSE(A1:A50) in the formula. If you run the evaluate on just the evaluated range of A1:A50, it will keep the semi-colon separator and not use the comma. But if you run the F9 by selecting the function and the range [TRANSPOSE(A1:A50)], it should work. Awesome tip, I have run into this issue many times before. Glad I now know the fix.
February 15th, 2011 at 10:30 am
Michael,
Thanks!!
March 16th, 2011 at 10:47 pm
[...] Unfortunately you need some vba code to pull this one off: VBA Join function or maybe not, read this: Concatenate a cell range without vba in excel [...]
September 11th, 2011 at 4:36 pm
Great tip thanks! On Office for Mac, use command+'=' instead of F9
February 6th, 2012 at 8:19 am
Thanks very much. Especially the extra bit adding a separator. Will save me a lot of time.
March 13th, 2012 at 1:49 am
I had to play with it a bit in Office 2010, but that F9 trick saved me hours.... Nice job !!!
March 16th, 2012 at 5:39 pm
Damien, Ross and Mark
Thanks!!
May 9th, 2012 at 12:09 pm
Thanks man! Great tip!
May 10th, 2012 at 10:33 pm
Nice.Thanks for your help. Only annoying thing is that the formula is limited on 8592 caracters or something like this. otherwise is just perfect with F9 function. Good job. 10x
May 15th, 2012 at 6:41 pm
There's another way to do it. It's a bit more cumbersome but it updates automatically (which this won't do for me) and you don't need to go through the process of selecting each cell (which can take quite awhile if there are a lot of them).
In a new cell, alongside the ones you will concatenate or anywhere else that there's enough space, set it equal to the first cell. Then in the next cell, concatenate that new cell and the second cell. Now just drag it all the way to the end and they'll all be concatenated. (I did it the other way around from the end to the beginning so the resulting string was at the beginning but it should work either way.
Like I said, it's a bit cumbersome but it updates and you don't have to select all the cells. As a plus, you can add onto it or take away from it simply by dragging without having to edit the formula again.
May 15th, 2012 at 9:21 pm
@Richard,
If you do the repeatd concatenations downward, you can display the last one using this formula (adjust the specified ranges as needed)...
=LOOKUP(2,1/(B1:B65535""),B:B)
May 18th, 2012 at 12:29 pm
Richard,
I believe this post describes the same method:
http://www.get-digital-help.com/2010/08/23/concatenate-cell-values-in-excel/
You can also use an user defined function to concatenate values:
http://www.contextures.com/rickrothsteinexcelvbatext.html