Formula Errors

Fix the Excel #NAME? Error Caused by Curly Quotation Marks in Formulas

Natalie TaylorNatalie Taylor Nov 12, 2026 869 views

Question details

The user needs to fix an Excel #NAME? error caused by invalid quotation marks in formula text.

Product
Microsoft Excel
Device & OS
not provided
Scenario
A formula contains text such as Pre-K PM enclosed in curly quotation marks, and the user needs the formula to calculate correctly.
Observed behavior
Excel returns a #NAME? error because curly quotation marks are not recognized as valid formula text delimiters.
Before you start

Click the affected cell and inspect the complete formula in the Formula Bar. Look specifically for typographic curly quotes (“ ”) around text values instead of standard straight quotes (").

Solution 1Recommended

Replace curly quotation marks with straight quotes in the formula

Use this solution when Excel displays #NAME? for a formula containing text enclosed by typographic quotation marks.

Excel formulas require straight quotation marks as text delimiters. The hyphen and word order in text such as Pre-K PM do not cause the error; the curly quotation marks do.

1
Select the affected cell

Open the worksheet and click the cell showing the #NAME? error. Click the Formula Bar to view and edit the formula.

2
Replace the quotation marks

Delete each curly quotation mark around the text and type a standard straight quotation mark from the keyboard. For example, change “Pre-K PM” to "Pre-K PM".

3
Confirm the formula

Press Enter to re-enter the formula. Excel should recognize the text value and recalculate the cell without the #NAME? error.

Use valid formula delimiters: Text in Excel formulas must be enclosed with straight quotation marks, not curly or smart quotation marks.

Fix Formula Text Errors with Straight Quotes in WPS Spreadsheets

WPS Spreadsheets lets you edit the formula directly in the Formula Bar, replace curly quotation marks with valid straight quotes, and recalculate the worksheet. It provides a familiar spreadsheet interface for correcting formula syntax.

  1. 1. Open the spreadsheet: Launch WPS Office, choose Spreadsheets, and open the workbook containing the formula error.
  2. 2. Inspect the formula: Select the cell with #NAME? and click the Formula Bar to locate curly quotation marks around text.
  3. 3. Enter straight quotation marks: Replace the curly marks with standard straight quotation marks, such as "Pre-K PM", then press Enter.
  4. 4. Check the result: Confirm that the cell recalculates correctly and no longer displays #NAME?.
Edit and correct #NAME? formula errors directly in the Formula BarUse familiar spreadsheet tools to review and recalculate formulasOpen and save Microsoft Excel .xlsx and .xls filesLightweight interface for everyday spreadsheet troubleshooting
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel show #NAME? when the formula text looks correct?

Excel can show #NAME? when text is enclosed in curly quotation marks. Formula text must use straight quotation marks, such as "Pre-K PM".

Are the hyphen or words in “Pre-K PM” causing the error?

No. The hyphen and word order are valid. Replace the curly quotation marks around the text with standard straight quotation marks.

Where can I edit the quotation marks in an Excel formula?

Select the affected cell and edit the formula in the Formula Bar or directly in the cell. Delete the curly marks and type straight quotation marks from the keyboard.

Can WPS Spreadsheets fix the same #NAME? error?

Yes. Open the workbook in WPS Spreadsheets, select the error cell, edit the formula in the Formula Bar, replace curly quotes with straight quotes, and press Enter.