How to Remove Extra Delimiter in Google Sheets – Join Columns

When you join values in different cells or columns, you may face a common issue. That’s the unwanted delimiter like commas, semicolons and pipe symbols in the joined text. You can intelligently remove such extra delimiter in Google Sheets.

I think I should better say how to avoid extra delimiter characters in Google Sheets that happens due to joining texts, numbers or any values in columns.

We normally use Comma or Semicolon as the delimiter. Appearing additional commas or semicolons in the joined text make it poorly formatted and affect the overall appearance of your Google Sheets Project.

To remove extra delimiter in Google Sheets what you want to do is to choose a suitable join function.

What we are going to do is not removing extra delimiter by using either of the functions SUBSTITUTE or REGEXREPLACE. Then? I am going to tell you how to properly join columns and avoid additional delimiters like repeated commas.

Note: I’ve provided one REGEXREPLACE formula too in this tutorial to help you remove extra comma delimiter.

Remove Extra Delimiter in Google Sheets

To concatenate values in arrays, normally I am using the CONCATENATE function. But it doesn’t support ‘properly’ placing a delimiter between the joined text. This function just appends strings to one another.

Then the most commonly used one is the JOIN function. This function can join texts using a specified delimiter.

Must Check: Google Sheets Functions Guide

The specified delimiter can be any character and normally we use the Comma or Semicolon for this purpose. The pipe symbol and the Caret is also common.

See what happens when we join columns using the Join function.

avoid or replace extra delimiter in google sheets

See one Join formula that uses Comma as the delimiter.

Formula:

="Availability: "&join(", ",A3:E3)

Result:

Availability: Cement, 5, , 5, 10

You can see one additional Comma in this result which is due to the blank cell C3 in the range that we joined.

Then how to remove extra delimiter in Google Sheets? As I’ve said above, we can avoid such additional delimiters by using another function.

Before going to that, as promised, let me share you one REGEXREPLACE formula.

Suppose I have the above formula result in the cell F6. The below formula can remove the extra comma.

=REGEXREPLACE(F6,", ,",",")

You can replace the above cell reference, i.e. F6, with the above JOIN formula itself.

=REGEXREPLACE("Availability: "&join(", ",A3:E3),", ,",",")

But all this is not required if you use another Google Sheets function to Join the columns. Yup! I am talking about the TEXTJOIN function in Google Sheets.

From the above example, you can understand that the additional delimiters are occurring due to the blank cells in the range.

In the function TEXTJOIN, you can decide whether to include blank cells or not.

Formula:

="Availability: "&textjoin(", ",TRUE,A3:E3)

Result:

Availability: Cement, 5, 5, 10

The Boolean TRUE in this formula directs the formula to ignore blank cells in the range. If you change it to the Boolean FALSE value, then there won’t be any difference in the output of this formula with the output of the JOIN formula.

So please use the function TEXTJOIN instead of the join function to avoid additional delimiters.

Must Read: The Flexible Array Formula to Join Columns in Google Sheets

Conclusion

Please understand one important thing. The functions JOIN and TEXTJOIN are an entirely different type of functions. The former only supports one-dimensional arrays and it’s not applicable to the latter.

Here is the comparison of the popular text join functions in Google Sheets – Difference Between JOIN, TEXTJOIN, CONCATENATE Functions in Google Sheets.

The TEXTJOIN function can be compared to the CONCATENATE function. The only difference is in the use of delimiter. The former can include separators (delimiters) but the latter can’t.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Lookup Values Under Categories in Excel and Google Sheets

We can use a combination of XLOOKUP and VLOOKUP in both Excel and Google...

Extract Items Under a Category from the Same Column in Excel

In Excel, you can use a combination of the XLOOKUP and DROP functions to...

How to Create a Searchable Table in Excel Using the FILTER Function

Finding specific records, or rows containing the required information, is straightforward in Excel using...

Time Sequences in Excel by Minute, Hour, or Second Increments

Creating time sequences, whether by hour, minute, or second increments in Excel, can be...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.