New Tool Radar

AI for Data & Spreadsheets

How to Check Whether an AI-Written TEXTJOIN Formula Drops the Delimiter

Check whether an AI-written TEXTJOIN formula drops the delimiter between joined values, or adds an extra one.

Schematic with three steps: Read the delimiter and ignore_empty arguments; Join the values by hand and compare; Fix the delimiter and re-check.

TEXTJOIN joins a range of values with a delimiter, such as a comma and a space, and it can skip empty cells or include them. An AI-written TEXTJOIN often leaves the delimiter argument empty, which glues the values together into one unreadable string, or sets ignore_empty wrongly, which leaves doubled delimiters where blank cells sat. Read the first two arguments before trusting the joined text.

What you need

  • The AI-written TEXTJOIN formula
  • The values it joins, with blank cells marked
  • The joined text the reader expects to see

Step 1: Read the delimiter and ignore_empty arguments

Click the formula cell and read the first argument, the delimiter, and the second, ignore_empty. An empty delimiter joins the values with nothing between them.

Step 2: Join the values by hand and compare

Write out the expected joined text by hand, with the delimiter between each value and no delimiter at the ends. Compare it character by character with the formula’s result.

Step 3: Fix the delimiter and re-check

Set the delimiter to the intended separator, such as “, “, and set ignore_empty to TRUE when blank cells should not leave doubled delimiters. Re-check the result against the hand-joined text.

Worked example: synthetic first and last name join

The table below is a synthetic example. It shows the expected result of checking an AI-written TEXTJOIN formula; no formula was run.

Check Value Result
Values to join Ada, Lovelace First and last name
Delimiter as written “” Empty delimiter
Result as written AdaLovelace No space between names
Corrected delimiter “, “ Returns Ada, Lovelace

Expected result (UNTESTED). TEXTJOIN with an empty delimiter returns AdaLovelace, gluing the names together; setting the delimiter to “, ” returns Ada, Lovelace, matching the hand-joined text. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • TEXTJOIN needs Excel 2019 or later, or Microsoft 365; older versions show #NAME?.
  • A delimiter of more than one character, such as “, “, is allowed and is used as written.
  • With ignore_empty set to FALSE, a blank cell leaves an empty piece and a doubled delimiter.
  • TEXTJOIN has a limit on the length of its result; a very long join returns an error.

Sources

See all