Function Problems

How to Remove Quotation Marks and Line Feeds from Excel TEXTJOIN Output

Huma Ashraf ChHuma Ashraf Ch Nov 2, 2026 870 views

Question details

The user needs to remove unexpected quotation marks, apostrophes, or line-feed characters generated when combining TEXTJOIN and FORMULATEXT functions.

How to Remove Quotation Marks and Line Feeds from Excel TEXTJOIN Output
Product
Microsoft Excel
Device & OS
not provided
Scenario
Using TEXTJOIN combined with FORMULATEXT to extract and concatenate formulas from multiple cells into a single string.
Observed behavior
The resulting combined string contains unwanted quotation marks, apostrophes, or line-feed characters instead of returning clean text.
Before you start

Before modifying your formulas, identify whether the unwanted characters are standard quotation marks or hidden line breaks, as each requires a slightly different formula adjustment.

Solution 1Recommended

Use the SUBSTITUTE Function to Clean the Output

Wrapping your TEXTJOIN formula in a SUBSTITUTE function allows you to target and replace specific unwanted characters with empty strings.

The most effective way to remove artifacts generated by FORMULATEXT is to nest your main formula inside one or more SUBSTITUTE functions. This function searches for a specific character (like a quote or a line break) and replaces it with nothing.

1
Remove Quotation Marks

To remove standard quotation marks, select your target cell and use the following formula structure: =SUBSTITUTE(TEXTJOIN("&",TRUE,FORMULATEXT(G1008:H1008)),"""","""). The four consecutive quotes represent a literal double quote in Excel.

2
Remove Line-Feed Characters

If your original cells contain line breaks (Alt+Enter), remove them using CHAR(10): =SUBSTITUTE(TEXTJOIN("&",TRUE,FORMULATEXT(G1008:H1008)),CHAR(10),"").

3
Remove Both Simultaneously

To clean both characters at once, nest the formulas: =SUBSTITUTE(SUBSTITUTE(TEXTJOIN("&",TRUE,FORMULATEXT(G1008:H1008)),"""","""),CHAR(10),"").

Use the SUBSTITUTE Function to Clean the Output
Formula Tip: CHAR(10) is the standard ASCII character code for a line break in Excel. Using it within SUBSTITUTE is the cleanest way to strip out hidden carriage returns.
Advanced Formula Support

Clean Up Complex Formulas with WPS Spreadsheet

WPS Spreadsheet offers comprehensive support for advanced dynamic array functions like TEXTJOIN and text manipulation functions like SUBSTITUTE. You can easily manage complex formula combinations to format and clean your data without unexpected formatting errors.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your target formulas.
  2. 2. Select the target cell: Click on the cell where you want the combined formula output to appear.
  3. 3. Enter the nested formula: Type the nested SUBSTITUTE and TEXTJOIN formula to strip out quotation marks and line breaks.
  4. 4. Apply the calculation: Press Enter to execute the formula and view your perfectly formatted, clean text string.
Fully compatible with Microsoft Excel formulas and array functions.Seamlessly handle TEXTJOIN, SUBSTITUTE, and FORMULATEXT logic.Free, lightweight, and fast performance for large datasets and complex calculations.Familiar user interface ensuring zero learning curve for Excel users.
microsoft office alternative - wps office

Frequently Asked Questions

Why does FORMULATEXT add quotation marks?

When the FORMULATEXT function extracts formulas, it reads the exact string. If the original formula contains text strings naturally enclosed in quotes, they are pulled into the result, which TEXTJOIN then combines as literal text.

What is CHAR(10) in Excel formulas?

CHAR(10) represents the line feed (line break) character. It is often used to insert a new line within a cell or, when used in conjunction with the SUBSTITUTE function, to find and remove unwanted line breaks from a text string.

How do I represent a quotation mark inside an Excel formula?

To specify a literal double quotation mark in an Excel formula, you must use four consecutive quotation marks (""""). The outer quotes define the text string boundary, and the inner two represent the actual quotation mark character.