Function Problems

How to Replace Double Quotes in Excel Using the SUBSTITUTE Function

Amos GikundaAmos Gikunda Oct 26, 2026 870 views

Question details

The user needs to replace double quotation marks in an Excel cell using the SUBSTITUTE function but encounters syntax errors due to improper character escaping.

How to Replace Double Quotes Using the SUBSTITUTE Function in Excel
Product
Excel
Device & OS
not provided
Scenario
Cleaning or formatting text data containing double quotation marks that need to be replaced with a space or removed entirely.
Observed behavior
Excel returns a formula syntax error when a standard double quote is typed directly into the SUBSTITUTE function's arguments.
Before you start

Identify the target cells containing the text you want to modify, and decide what character (such as a space or an empty string) will be used to replace the double quotes.

Solution 1Recommended

Use the CHAR(34) Function

The most readable and reliable way to handle double quotes in Excel formulas is by using the CHAR(34) function to represent the quotation mark.

Excel uses the CHAR function to return specific characters based on their numeric ASCII codes. The code for a double quotation mark is 34. Using this avoids confusing Excel's formula parser.

1
Select the destination cell

Click on an empty cell where you want the cleaned text to be displayed.

2
Enter the SUBSTITUTE formula

Type the formula =SUBSTITUTE(D7, CHAR(34), " ") into the formula bar. In this example, D7 is the cell containing the original text, and we are replacing the double quote with a space.

3
Apply and fill

Press Enter to execute the formula. You can then drag the fill handle down to apply this formatting to the rest of your data column.

Use the CHAR(34) Function
Additional CHAR Codes: You can also use CHAR(32) to represent a space character and CHAR(39) to represent a single quotation mark if you need to clean other symbols.
Efficient Data Cleaning with WPS

Easily Clean and Format Data with WPS Spreadsheet

WPS Spreadsheet fully supports the SUBSTITUTE and CHAR functions, allowing you to seamlessly process text data and manage complex formulas without hassle.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook containing the text data that needs cleaning.
  2. 2. Enter the Formula: Select a blank cell and type the SUBSTITUTE formula, utilizing CHAR(34) for the double quotes.
  3. 3. Apply and Fill: Press Enter to execute the formula, then click and drag the fill handle to apply it across your entire dataset.
Fully compatible with Microsoft Excel formulas and .xlsx file formats.Lightweight software with fast processing speeds for large datasets.Free built-in tools for data cleaning, text extraction, and formatting.Intuitive tabbed interface for easier multitasking across multiple workbooks.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel show an error when I type a double quote directly in a formula?

Excel uses double quotes to define the beginning and end of text strings. When you insert a standalone double quote inside a text string formula, Excel's syntax parser gets confused about where the text actually ends, resulting in a formula error. You must escape it using four quotes ("""") or the CHAR(34) function.

How do I remove the double quotes entirely instead of replacing them with a space?

To completely remove the double quotation marks from your text, leave the new_text argument empty in the SUBSTITUTE function. For example, use the formula =SUBSTITUTE(D7, CHAR(34), "").

Can I replace single quotes using the same SUBSTITUTE method?

Yes, you can replace single quotation marks. You can either type the single quote normally within double quotes (like "'") or use the CHAR(39) function in your SUBSTITUTE formula, such as =SUBSTITUTE(D7, CHAR(39), " ").