

Function JoinText(delimiter As String, rng As Range) So do we have any other way to combine texts with a given delimiter in Excel? The other way is the VBA way. You have the cells joined with commas.īut this way is not that effective for too many operations. Now press F2 and select the range in the formula bar or cell. In a cell, write "=" to start the formula and select the range as shown below. So to concatenate cells in a row with commas do this. So if you want to concatenate the cells with commas, we'll need to use a trick. The problem is that the TEXTJOIN function is only available to Excel 2019 and 365. = TEXTJOIN (",",TRUE, TRIM (B3:E3,B7:E7))Ĭoncatenating Cells with Commas in Excel 2016 and Older

To avoid spaces, use the TRIM function to strip them out. Now if any cell has invisible values like space then you will see an extra comma in between the joined text. The second variable is set to be true so that it ignores the blank cells. The TEXTJOIN function requires the delimiter with which you want to join text with. It will concatenate all the texts ignoring the blank cells. So the formula will be: = TEXTJOIN (",",TRUE,B3:E3,B7:E7) Let's say if you want to concatenate the range B3:E3 and B7:E7. You can see that we have a string which is a result of concatenation of texts with commas. Let's implement the formula we have and drag it down. We need to join the texts of each cell in a row. Here, we have some values in range B2:E8. Example: Join Cell Values of Ranges With Comma as Delimiter Let’s see an example to make things clear. : The other ranges if you want to join in the text with commas. Text_range1 : This is the range whose cells have values you want to concatenate. TRUE : For ignoring blank cells in the range. Since in this article we are concentrating on concatenating cells with commas. )Ĭomma (",") : This is the delimiter we want to use. Generic Formula = TEXTJOIN (",", TRUE, text_range1. For users who don't have this function we will discuss other methods of concatenating range values with comma.\
#EXCEL SPLIT CELLS BY DELIMTER HOW TO#
In this article, we will learn how to concatenate cell values of a range with comma using TEXTJOIN function.

But now Excel has introduced a new function called TEXTJOIN Function that can be used to concatenate ranges with a lot more flexibility. But if we wanted to supply a range for joining cells with a delimiter (say a comma) then it is really tricky with these functions. Now you can sort and filter correctly on the values you separated.So earlier we had CONCAT, and CONCATENATE function to concatenate multiple cells. You can always change column data types later as well.

By using Excel’s “Text to Columns” feature, we can separate these two distinct data points.Īs long as you have a consistent delimiter (in my case, the pipe character “|”) or a pre-determined fixed width, you can easily move the text following the delimiting character (or exceeding the specified width) to the adjacent column (which I’ve inserted in advance to prevent overwriting existing data in the original second column). For example in the following data dates are combined with event names making it impossible to filter or sort by either date or event. You’re bound to run into an excel sheet where differing data types are joined together in a single column.
