How to use quotation marks in Excel formulas: When to use single and double quotes
This explains when to use quotation marks in Excel formulas, the respective roles of double and single quotes, and troubleshooting common errors such as Chinese quotation marks and single quotes in worksheet names, helping you correctly write conditional and text results.
When writing formulas in Excel, you often encounter situations where the same IF function works fine in one formulation but returns an error in another. The problem usually lies with quotation marks. Some people use single quotes for text, others use Chinese quotation marks generated by their input method, and still others are unsure whether numbers need to be enclosed in quotes. These details don’t affect your ability to understand the formula, but they directly determine whether the formula can compute correctly.
This article is for readers who frequently use functions like IF, COUNTIF, and VLOOKUP but keep making mistakes with quotation marks. After reading it, you’ll be able to determine whether a quotation mark is needed and which type to use, as well as troubleshoot common errors step by step. Note that this discusses the syntax of quotation marks within formulas; entering a single quote at the beginning of a cell to convert a number to text is a separate issue.
Below, we first present the conclusion, then explain the uses of double and single quotation marks separately, and finally summarize issues related to Chinese quotation marks and troubleshooting steps.
When to use quotation marks, single quotes, or double quotes in formulas? One-sentence conclusion
Enclose text within formulas in English double quotes; when sheet names contain spaces or special characters, Excel automatically adds single quotes, which should not be used to enclose text.
| Your situation | Recommended practice | Reason |
|---|---|---|
| The formula should return a text string, such as "Pass". | Enclose it in double English quotation marks, e.g., "qualified" | Double quotation marks designate a text constant, which Excel treats as text. |
| The condition includes comparison symbols, such as greater than 60. | Enclose the entire condition in double quotes, such as ">60" | The criteria for functions such as COUNTIF and SUMIF must be specified as text strings. |
| Referencing other worksheets with names containing spaces | Preserve the single quotes automatically added by Excel, such as 'Sales Table'!A1 | Single quotes are used to enclose worksheet names containing special characters. |
| You need to concatenate text and cell contents within formulas. | Use & to concatenate, e.g., A1&"yuan" | Text segments should be enclosed in double quotes, and & is responsible for concatenating the segments. |
| Directly reference numbers or cells | Without quotation marks, e.g., A1*2 | Numbers and cell addresses are themselves part of the formula. |
Double Quotes: Text, Conditions, and Concatenation in Formulas
Double quotes are the boundary that Excel uses to recognize a "text constant." Whenever a formula contains anything that is neither a function name, a cell reference, nor a number, it should generally be enclosed in double quotes.
Three Common Scenarios
The first type returns text results. For example, =IF(B2>=60,"Pass","Retake"), where both results "Pass" and "Retake" are text strings and must be enclosed in double quotes. If the quotes are omitted, Excel will treat "Pass" as a name to look up, typically resulting in #NAME?.
The second type is comparison criteria. For example, =COUNTIF(C:C,">=60") counts the cells in column C that are greater than or equal to 60. The comparison operator and the number must be enclosed together in double quotes, written as ">=60". If you write >=60 without the quotes, the formula will result in an error.
The third method is to concatenate text. For example, =A2&"("&B2&")" can combine the contents of two columns into a single string. The parentheses are literal text and must be enclosed in double quotes.
What if the text itself contains double quotes?
If the text already contains double quotes, you need to write two consecutive double quotes to represent a single one. For example, to return the text He said "good", the formula is = "He said""good"". The outer double quotes serve as delimiters, while the two inner double quotes represent an actual quotation mark character.
What exactly is the purpose of single quotes?
In Excel formulas, single quotes appear almost exclusively in worksheet references, such as ='2024 Sales'!B3. When a worksheet name contains spaces, punctuation marks, or begins with a number, Excel automatically adds single quotes around the name. If the name is simply Sheet1, single quotes typically do not appear.
This point can easily lead to three misunderstandings:
- Use single quotes instead of double quotes to enclose text. Writing it as ='excellent' usually prevents Excel from treating it as text, which would cause a formula error. Always use double quotes for text.
- Remove single quotes when you see them. If the cross-sheet reference was automatically generated by Excel, removing the single quotes might result in Excel being unable to find the sheet, potentially causing an error.
- Do not confuse single quotes at the beginning of a cell with those inside formulas. Placing a single quote at the start of a cell tells Excel to treat the content as text, excluding it from formula calculations. This is a different scenario and distinct from syntax within formulas.
Why do quotation marks typed using a Chinese input method cause errors?
Quotation marks entered in Chinese input mode are usually curved""or ‘’, which differ in shape from English quotation marks. Excel does not recognize Chinese quotation marks; when they are included in a formula, the result is often #NAME? or the formula cannot be calculated.
These errors are subtle because on the screen they only appear as differently shaped quotation marks. There are two ways to troubleshoot: first, switch the input method to English half-width mode before typing the quotation marks; second, when an error occurs, zoom in on the edit bar to examine the shape of the quotation marks—the curvature of Chinese quotation marks is more pronounced.
Note that #NAME? can also result from a misspelled function name or missing parentheses, so quotation marks are only one avenue to investigate.
📊 Core Comparison
| Symbol | Main function | Example | Precautions |
|---|---|---|---|
| English double quotation marks | Tagged text, conditions, and concatenated strings | ="Pass" | Must be in English half-width characters. |
| English single quotation mark | Define worksheet names containing spaces or special characters | ='Sales Table'!A1 | Mostly generated automatically by Excel; do not use it to wrap text. |
| Chinese double quotation marks | Not recognized as a formula | "Pass" | This can easily cause errors and needs to be replaced. |
| Without quotation marks | Numbers, cell addresses, function names | =A1*2 | Text without quotation marks will be treated as a name. |
How to Use It in Practice
- Before writing a formula, first determine which parts are text: any text results returned, comparison conditions, and characters used for concatenation must all be enclosed in English double quotes.
- Switch to the English half-width input mode before typing quotation marks to avoid generating Chinese quotation marks.
- When referencing other worksheets, let Excel automatically generate the reference; do not manually remove single quotes.
- If the formula returns an error, check the following in order: whether any text is missing quotation marks, whether quotation marks are Chinese-style, and whether function names and parentheses are correct.
- If the data the formula processes comes from a PDF table, you can first use the PDF editor in the OmniDoc desktop client to export it as an Excel file, then write the formula in Excel. After exporting, still verify numbers and dates to ensure accuracy before performing calculations.
🎯 Which approach is right for you?
- Calculate only within this table and return text results: Double quotes are sufficient; there is generally no need to worry about single quotes.
- Need to aggregate across tables: Pay special attention to whether sheet names contain spaces or special characters; Excel will automatically handle single quotes.
- Frequently write complex conditions by hand: Always enter quotation marks in English input mode, and after finishing, press F2 to enter edit mode and check each one individually.
❓ Frequently Asked Questions (FAQ)
1. Should numbers in formulas be enclosed in quotation marks?
No need. Just write the 2 directly in =A1*2. If you write it as ="2", it will be treated as text, which may not yield the expected results in certain calculations or comparisons.
2. I have already added double quotes; why is the formula still giving an error?
First, check whether the quotation marks are Chinese-style curved quotes; then verify that double quotes appear in pairs; finally, confirm that the function name and parentheses are correct. If all three checks pass, proceed to verify that the referenced cell or worksheet exists.
3. Can single quotes replace double quotes?
No. Writing it as =IF(A1>60,"Pass","Fail") will usually result in an error. Both the text results and the conditions should use English double quotes.
4. When using wildcards in conditions, how do you write quotation marks?
Wildcards must be enclosed in double quotes. For example, =COUNTIF(A:A,"Zhang") counts the cells in column A that contain the character "Zhang"; * represents any number of characters.
5. Why do worksheet names suddenly appear with single quotes?
This was added automatically by Excel. When a worksheet name contains spaces, punctuation, or begins with a number, Excel encloses the name in single quotes. As long as you don’t manually modify it, just leave it as is.
📝 Summary
In Excel formulas, text results, comparison conditions, and concatenated content are enclosed in English double quotes; single quotes mainly appear in worksheet references containing special characters and are automatically generated by Excel. Remember this rule and pay attention to issues with Chinese quotation marks—most errors caused by quotation marks can be quickly traced back to their source.


