30 Advanced Excel Tips for 2026

Excel Champs / Excel Formulas List / How to CONCATENATE a RANGE of Cells [Combine] in Excel
By Puneet Gogia (Microsoft MVP)

How to CONCATENATE a RANGE of Cells [Combine] in Excel

30+ Advanced Excel Tips for 2026

No spam. Only Excel Stuff. God Promise. 😊

CONCATENATE can’t accept a range — point it at A1:A5 and it returns only the first cell. Use TEXTJOIN instead: =TEXTJOIN(" ",TRUE,A1:A5) combines the whole range with a space between each value, and the TRUE skips blanks.

Change the first argument for a different separator — “, ” for a comma-separated list. If you don’t need a separator at all, =CONCAT(A1:A5) runs the values together.

Both need Excel 2019 or later; standalone Excel 2016 has neither. On older versions the practical options are a helper approach with &, or Power Query’s Merge Columns, which has the advantage of updating on refresh when you add rows.

Two no-formula routes worth knowing: Home → Editing → Fill → Justify merges a selected column of text into the top cell in one click, and Power Query handles it repeatably. Note that Fill Justify and the CONCATENATE+TRANSPOSE+F9 trick both produce static text — they don’t update when the source cells change.

Combining values with CONCATENATE is the best way, but with this function, it’s not possible to refer to an entire range. You need to select all the cells of a range one by one, and if you try to refer to an entire range, it will return the text from the first cell.

In this situation, you do need a method where you can refer to an entire range of cells to combine them in a single cell. Today in this post, I’d like to share with you 5 different ways to combine text from a range into a single cell.

[CONCATENATE + TRANSPOSE] to Combine Values

The best way to combine text from different cells into one cell is by using the transpose function with concatenating function.

Look at the below range of cells where you have text, but every word is in a different cell, and you want to get it all in one cell. Below are the steps you need to follow to combine values from this range of cells into one cell.

  1. In the B8 (edit the cell using F2), insert the following formula, but do not press Enter.
    • =CONCATENATE(TRANSPOSE(A1:A5)&” “)
  2. Now, select the entire inside portion of the concatenate function and press F9. It will convert it into an array.
  3. After that, remove the curly brackets from the start and the end of the array.
  4. In the end, hit enter.
concatenate a range of cells with concatenate transpose

That’s all.

Note that every value gets a space after it, so the result has one extra space at the end. And in Microsoft 365, you don’t need the F9 step: CONCAT with TRANSPOSE works as a normal formula (formula below).

=TRIM(CONCAT(TRANSPOSE(A1:A5)&" "))

How this formula works

In this formula, you have used TRANSPOSE and space in the CONCATENATE. When you convert that reference into hard values it returns an array. In this array, you have the text from each cell and a space between them and when you hit enter, it combines all of them.

Combine Text using the Fill Justify Option

Fill justify is one of the unused but most powerful tools in Excel. And whenever you need to combine text from different cells, you can use it. The best thing is that you need a single click to merge text. Have a look at the below data and follow the steps.

2 concatenate a range of cells with fill justify
  1. First of all, make sure to increase the width of the column where you have text.
  2. After that, select all the cells.
  3. In the end, go to Home Tab ➜ Editing ➜ Fill ➜ Justify.

This will merge text from all the cells into the first cell of the selection.

Fill Justify works only with text values in a single column. It doesn’t combine numbers or formulas, and if the combined text is wider than the column, Excel splits it again into more than one cell. That’s why you need to make the column wide enough first.

TEXTJOIN Function for CONCATENATE Values

If you are using Excel 2019 or later (or Microsoft 365), there is a function called “TextJoin”. It can make it easy for you to combine text from different cells into a single cell.

Syntax:

TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)

  1. delimiter: a text string to use as a delimiter.
  2. ignore_empty: TRUE to ignore blank cells, FALSE to include them.
  3. text1: text to combine.
  4. [text2]: more text to combine (optional).

How to Use It

To combine the below list of values you can use the formula:

=TEXTJOIN(" ",TRUE,A1:A5)
3 concatenate a range of cells with text join min

Here you have used a space as the delimiter, TRUE to ignore blank cells, and the entire range in a single argument. In the end, hit Enter, and you’ll get all the text in a single cell.

To separate the values with a comma instead of a space, change the delimiter:

=TEXTJOIN(", ",TRUE,A1:A5)

And if you want to combine only the values that meet a condition, use IF inside TEXTJOIN. The following formula combines the values from A1:A5 where column B has “Yes” (in Excel 2019, press Ctrl + Shift + Enter):

=TEXTJOIN(", ",TRUE,IF(B1:B5="Yes",A1:A5,""))

Combine Text with Power Query

Power Query is a fantastic tool and I love it. Make sure to check out this (Excel Power Query Tutorial). You can also use it to combine text from a list in a single cell. Below are the steps.

  1. Select the range of cells and click on “From Table/Range” in the Data tab.
    4 concatenate a range of cells with power query from table min
  2. It will load your data into the Power Query editor.
    5 concatenate a range of cells with power query editor min
  3. Now from here, select the column and go to “Transform Tab”.
  4. From “Transform” tab, go to Table and click on “Transpose”.
    7-concatenate-a-range-of-cells-with-power-query-horizontal-min
  5. Next, select all the columns (select the first column, press and hold the Shift key, and click on the last column), right-click, and then select “Merge Columns”.
    8 concatenate a range of cells with power query merge cells min
  6. After that, from the Merge Columns window, select Space as the separator and name the column.
    9 concatenate a range of cells with power query new column name min
  7. In the end, click OK and click on “Close & Load”.

Now you have a new worksheet in your workbook with all the text in a single cell. The best thing about using Power Query is you don’t need to do this setup again and again.

When you update the old list with a new value, you need to refresh your query, and it will add that new value to the cell.

VBA Code to Combine Values

If you want to use a macro code to combine text from different cells, then I have something for you. With this code, you can combine text in no time. All you need to do is, select the range of cells where you have the text and run this code.

 Sub combineText()
 Dim rng As Range
 Dim i As String
 For Each rng In Selection
 i = i & rng & " "
 Next rng
 Range("B1").Value = Trim(i)
 End Sub 

Make sure to specify your desired location in the code where you want to combine the text.

This code adds a space after every cell, including blank cells, so blank cells in the selection give you double spaces in the result. If you’re on Excel 2019 or later, you can use WorksheetFunction.TextJoin in VBA, which skips the blank cells:

Sub combineTextJoin()
Range("B1").Value = WorksheetFunction.TextJoin(" ", True, Selection)
End Sub

Which Method to Use

  • TEXTJOIN: the best choice in Excel 2019, 2021 and Microsoft 365, as it updates when the values change and lets you pick a delimiter.
  • CONCATENATE + TRANSPOSE: for older versions, but the result is fixed text after you press F9.
  • Fill Justify: a quick one-time merge of text cells in one column.
  • Power Query: when the list keeps growing, and you want to refresh the result.
  • VBA: when you combine text from different selections again and again.

In the end,

There may be different situations for you where you need to concatenate a range of cells into a single cell. And that’s why we have these different methods.

All methods are easy and quick; you need to select the right method as per your need. I must say, give all the methods a try once and tell me:

Which one is your favorite and worked for you?

Please share your views with me in the comment section. I’d love to hear from you, and please, don’t forget to share this post with your friends, I am sure they will appreciate it.

Frequently Asked Questions

Why does CONCATENATE not work with a range?

CONCATENATE takes each value as a separate argument, so it can’t combine a whole range into one value. Use CONCAT or TEXTJOIN instead, which accept a range.

What is the difference between CONCAT and TEXTJOIN?

CONCAT joins the values without anything between them. TEXTJOIN lets you add a delimiter, like a space or a comma, and can skip blank cells.

How do I keep the number format when combining?

Formulas combine the underlying values, so dates and currencies lose their format. Wrap them in TEXT, like TEXT(A1,”dd-mmm-yyyy”), before you combine them.

Puneet Gogia

Written by

Puneet Gogia

Microsoft MVP — Excel · Founder, Excel Champs

Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.

3M+ readers helped
1,000+ tutorials written
Since 2015 teaching Excel

58 thoughts on “How to CONCATENATE a RANGE of Cells [Combine] in Excel”

  1. I have a list of different tags i need to put together in a different sheet for convenience, problem is that values pulled from other documents does not increase when copied to new cell, how to i make the numbers after the $ to increase with 1? (In the string below id like $58 and $69 to increase when i copy to new cell by dragging downwards)
    =CONCATENATE(‘[PLCTagsASi.xlsx]PLC Tags’!$A$58;”_”;'[PLCTagsASi.xlsx]PLC Tags’!$D$60)

    Reply
  2. Hi the VBA portion works almost exactly for what I need. I changed the separator though to be ” || “. Doing this of course yields combined numbers separated by a space, two || symbols, and another space. However, they come out as 0943 || 0957 || 0960 || 0963 || and as you can see it puts those || symbols at the end. Is there a way to not have it put the space and the two || symbols after the last number? So that when it combines them it would only be 0943 || 0957 || 0963? If the macro can do that, that would be exactly what I need it for. Would that be an edit to the VBA and what would that edit be? Please and thank you so much!

    Reply
  3. #1 is of no use, string value is fixed at moment when concat & transpose formula written.

    Reply
  4. Super helpful post RE concatenation of a range of cells in XLS; thank you!

    Reply
  5. All your solutions are excellent.
    Many different methods are also taught.
    Though I am very good at Excel, I learn many many things from your website.
    THANKS A LOT.
    God Bless.

    Reply
  6. 115750-760 ,765how to convert in column with serial wise

    Reply
  7. Hi,

    You’re a genius. Very very help for me. Thanks a lot.

    Regards,
    Al-Amin

    Reply
  8. Hello,
    Is it possible via formula, w/o vba nor Power Tools, to combine 2 arrays (generated by formula) into a non-array value separated by comas. Textjoin will work with only 1 array but returns the first element when there is a division of array inside the Textjoin formula. I also tried to have another cell to do the division w/o luck. If u need to know why I’m doing this, I’ll be glad to add more details.
    TQ, KR!

    Reply
  9. Thank you so much for this, the formula worked perfectly – saved me ages. Thanks 🙂

    Reply
  10. Thank you for this VBA code. It works great! However, I want to add one more aspect to the code and I can’t quite figure it out.

    I would like for the code to locate a cell, based on a certain text, then select everything in the list below that cell. Is that something easily doable?

    Reply
  11. Good morning.

    Thanks for the interesting article. Unfortunately, as far as I can see, none of the methods actually does what I want.

    I am writing an accounting spreadsheet, and I want a column that shows an error message if there is anything unexpected in the columns where I enter data, or in the calculation columns. At present, it is a huge long tangle of nested if statements and messages joined by “&” operators. I want to simplify this by setting up some columns, each of which detects a particular error, and generates an appropriate message if it finds it. This will make it much easier to add more error checking in future – just insert more columns in this part of the sheet.

    In this scenario, the error message column (the one that is always visible) needs to be a concatenation of all the individual error columns.

    The first two methods don’t work, since they use the values of the cells at the time you type the formula, while I want one that continually updates as the data – and messages – change.

    The third method doesn’t work because I am using the standalone Excel 2016, which doesn’t have TEXTJOIN. This is particularly frustrating, because TEXTJOIN is exactly the function I need!

    One day, I intend to add some VBA code to my spreadsheet to cover things like year end (when I have to chop off a year’s worth of data and replace it with a few lines of carried-forward values), but I have never programmed in VB (of any flavour), so this is going to be a major project. (Maybe I’ll use Python code instead.) The problem I foresee here is that code generally executes when the user clicks a button; formulae execute when you change a cell on which they depend. If I set up a VBA program to execute every time I enter data, and it computes this for every line of the spreadsheet, it introduces a huge processing overhead! And if I (or anyone else using the sheet) can remember to click a “check for errors” button, we can remember to check for errors anyway.

    So this leaves Power Query. I’d never even heard of this tool before I read your article! If (as I suspect) I need to click something to refresh my query in order to check for errors, then it suffers from the same problem as VBA. But it’s worth further investigation. Thank you for bringing it to my attention.

    Maybe I need to migrate to Excel 2019. Now that I have (I think) sorted out all the bugs that were introduced when I migrated from Excel 2007 to Excel 2016, that’s a possibility. (The bugs mostly concerned the changed behaviour of SUMIF when the data range and criterion range were different lengths)

    In the meantime, I shall probably set up the columns I need, and concatenate them with & or CONCATENATE. I’ll just have to remember to add more arguments to the formula whenever I add more error checking columns.

    Philip.

    Reply
    • Philip

      This may be a bit out of date now. However, if the above VBA is adjusted, it can be used to return the concatenated strings as a normal formula, enter (something like) the following into a VBA module (Alt-F11, Insert-Module):

      “Public Function RANGECAT(rng1 As Range, Optional rng2 As Range) As String
      Dim r1 As Integer, c1 As Integer, r2 As Integer, c2 As Integer
      Dim cel As String

      cel = “”
      For c1 = 1 To rng1.Columns.Count
      For r1 = 1 To rng1.Rows.Count
      cel = cel + rng1.Cells(r1, c1)
      Next r1
      Next c1
      If rng2 Is Nothing Then
      Else
      For c2 = 1 To rng2.Columns.Count
      For r2 = 1 To rng2.Rows.Count
      cel = cel + rng2.Cells(r2, c2)
      Next r2
      Next c2
      End If

      RANGECAT = cel
      End Function”

      The “combineText = cel” returns the value found. Further ranges can be added as needed (using “Optional rng3 as range, …” and repeating the rng2 for loops).

      Hope it helps

      Reply
  12. Hi Puneet,

    I have 1 Query in VBA Example : Ship Mode : Instant Air
    And Customer Name’s : Jeremy Lonsdale
    Cindy Schnelling
    Susan Vittorini
    Toby Braunhardt
    Ralph Arnett
    Harold Engle
    Helen Abelman
    Guy Armstrong
    Jennifer Braxton
    Giulietta Baptist

    And I need the result is Instant Air
    Roy Skaria, Jeremy Lonsdale, Cindy Schnelling, Susan Vittorini, Toby Braunhardt, Ralph Arnett, Harold Engle, Helen Abelman, Guy Armstrong, Jennifer Braxton, Giulietta Baptist, Erica Bern, Christopher Schild, Joy Smith, Evan Minnotte, Jenna Caffey,

    Like this Instant Air Would be one line remaining all are in one line with commas how it is possible can you let me know.

    Reply

Leave a Comment