How to Add Quotes in Excel (Single and Double Quotes)

We will use the following sample dataset to insert quotes in various cells.

1- overview image of quotes in Excel


Download the Practice Workbook


What Is the Key Difference Between Single and Double Quotes in Excel?

Double quotes are used for formulas, escaping characters, and representing text values, while single quotes are used to display quotes.

30- difference between single and double quotes in Excel


How to Add Single Quotes to Text in Excel


Method 1 – Use the CHAR Function to Add Single Quotes in Excel

Here’s an overview of the char function. CHAR(39) denotes single quotes.

Overview of CHAR Function

  • Insert the following formula in cell C5 and press Enter to wrap the text in B5 in single quotes.
=CHAR(39)&B5&CHAR(39)
  • Use the AutoFill tool to apply the same formula in the cells C6:C9.

2- using CHAR function to add single quotes in Excel


Method 2 – Insert Single Quotes with the CONCATENATE Function

Here’s an overview of the CONCATENATE function:

Overview of Concatenate Function

  • Insert the following formula in cell C5 and press Enter to wrap the value from B5 in quotes.
=CONCATENATE("'",B5,"'")
  • Use the AutoFill tool to apply the same formula in the cells C6:C9.

3- inserting single quotes with CONCATENATE Function


Method 3 – Use a Formula with the Ampersand Symbol to Add Single Quotes

  • Insert the following formula in cell C5 and press Enter.
="'"&B5&"'"
  • Use the AutoFill tool to apply the same formula in the cells C6:C9.

7- final output image after applying formula with ampersand symbol to add single quotes


Method 4 – Apply a Custom Format to Insert Single Quotes

  • Copy the data of cells B5:B9 into cells C5:C9.
  • Right-click on any cell from C5 to C9 and select Format Cells.

4- selecting format cells to apply custom format

  • Select Custom under the Number section from the Format Cells dialog box.
  • Add ‘@‘ inside the Type box and click OK.

5- adding @ symbol inside type box

  • This wraps the contents in single quotes.

6- final output image of applying the custom format to insert single quotes


How to Add Double Quotes to Text in Excel

We added a new column named Country Name between the “City Name” and “With Double Quotes” columns.

31- dataset for adding double quotes in Excel


Method 1 – Using CONCATENATE Function

  • Insert the following formula in cell D5 and press Enter.
=CONCATENATE("""",B5,""""," in  ","""",C5,"""")
  • AutoFill to apply the same formula in the cells D6:D9.

18- using CONCATENATE function to add double quotes


Method 2 – Combining CONCATENATE and CHAR Functions

  • Insert the following formula in cell D5 and press Enter.
=CONCATENATE(CHAR(34),B5,CHAR(34)," in ",CHAR(34),C5,CHAR(34))
  • Use the AutoFill tool to apply the same formula in the cells D6:D9.

16- adding double quotes with CONCATENATE and CHAR functions in Excel


Method 3 – Combining the CHAR Function and the Ampersand Operator

  • Insert the following formula in cell D5 and press Enter.
=CHAR(34)&B5&CHAR(34)&" in  "&CHAR(34)&C5&CHAR(34)
  • Use AutoFill to apply the same formula in the cells D6:D9.

17- combining CHAR function and ampersand operator


Method 4 – Using the Ampersand Operator

  • Insert the following formula in cell D5 and press Enter.
=""""&B5&""""&" in  "&""""&C5&""""
  • Use the AutoFill tool to apply the same formula in the cells D6:D9.

12- using ampersand operator to add double quotes


Method 5 – Applying the Custom Format Cells Feature

  • Select the cells B5:C9 and go to the Home tab.
  • Go to the Format drop-down and select More Number Formats.

13- selecting more number formats option

  • Select Custom under the Number section from the Format Cells dialog box.
  • Put “@” inside the Type box and click OK.

14- setting custom format

  • You can see that cells B5:C9 are confined to double quotes.

15- final output image of applying custom command of format cells to insert double quotes


How to Add Quotes for Different Types of Data in Excel (Text, Number, Date, and Currency)

We have modified our dataset to include various data types.

19- modified dataset to add quotes to different types of data

  • Select cell B5:B9 and press Ctrl + 1 to open the Format Cells dialog box.
  • Under the Category list, select Custom.
  • Inside the Type text box, enter \”@\” and click OK.
Note: For adding single quotes, type ‘\@\’ in the Type text box.

20- adding double quotes around text using custom number formatting

  • Double quotes will be added to the cell range B5:B9.

21- added double quotes around text using custom number formatting

  • You can add quotes around multiple text values (C5:C9).
  • Go to Custom Format, and inside the Type text box, enter \”@\” and click OK.
  • As a result, double quotes will be added to cell range C5:C9.

22- added double quotes around multiple text using custom number formatting

  • For the D5:D9 range, which contains numbers, inside the Type text box, enter \”0\”.

23- added double quotes around ID using custom number formatting

  • To add quotes around the Date, in the Format Cells dialog box, type \”d-mmm-yy\” in the Type box under the Custom category.

24- added double quotes around Date using custom number formatting

  • For the Salary, which is in the Currency format, inside the Type text box, enter \”$#,##0_)\”;[Red]\”($#,##0)\” and click OK.

25- added double quotes around Salary using custom number formatting

Note: Negative values in the Salary column will be marked as red and be in parentheses.

26- negative salary value issue


How to Add Quotes Around Numbers Using Formulas in Excel

To add quotes in the ID No. column (simple number format):

  • Insert the following formula in cell D12 and AutoFill the rest of the cells of the column.
=CHAR(34)&D5&CHAR(34)

To add quotes in the Joining Date column (date format):

  • Insert the following formula in cell E12 and AutoFill the rest of the cells of the column.
=CHAR(34)&TEXT(E5, "dd/mm/yy")&CHAR(34)

And to add quotes in the Salary column (currency format):

  • Insert the following formula in cell F12 and AutoFill the rest of the cells of the column.
=CHAR(34)&TEXT(F5, "$#,##0")&CHAR(34)

27- added quotes around numbers in Excel with formulas


How to Insert Quotes Using Excel VBA

Method 1 – Insert Single Quotes

  • Copy the cell range B5:B9 in the cell range C5:C9.
  • Select Visual Basic under the Code group from the Developer tab.

8- selecting visual basic to insert single quotes using Excel VBA

  • A new window will appear.
  • Select Module from the Insert tab.

9- selecting module from insert section

  • Insert the following code in that module.
Sub AddQuote()
Dim myCl As Range
For Each myCl In Selection
If myCl.Value <> "" Then
myCl.Value = Chr(39) & Chr(39) & myCl.Value & Chr(39)
End If
Next myCl
End Sub

10- VBA code to insert single quotes

Code Breakdown:

  • Dim myCl As Range declares a variable to represent a cell in a worksheet.
  • For Each myCl In Selection

If myCl.Value <> “” Then
myCl.Value = Chr(39) & Chr(39) & myCl.Value & Chr(39)
End If

This Loop goes through each cell in the currently selected range (selection). It checks if the value in the current cell is not empty. If the value is not empty, then it adds two single quotes before and one after the value.

  • Next myCl refers to moving to the next cell in the selection.

  • Press F5 to run the code and you will get your selected cells with single quotes.

11- final output result after running the VBA code to insert single quotes


Method 2 – Insert Double Quotes

  • Insert a new module and put the following code in it.
Sub AddDoubleQuotes()
Dim myCl As Range
For Each myCl In Selection
If myCl.Value <> "" Then
myCl.Value = Chr(34) & myCl.Value & Chr(34)
End If
Next myCl
End Sub

11.1- VBA code to insert double quotes

Code Breakdown:

  • Dim myCl As Range declares a variable to represent a cell in a worksheet.
  • For Each myCl In Selection

If myCl.Value <> “” Then
myCl.Value = Chr(34) & Chr(34) & myCl.Value & Chr(34)
End If

This Loop goes through each cell in the currently selected range (selection). It checks if the value in the current cell is not empty. If the value is not empty, then it adds one double quote before and one after the value.

  • Next myCl refers to moving to the next cell in the selection.

  • Press F5 to run the code and you will get your selected cells with double quotes.

11.2- final output result after running the VBA code to insert double quotes


How to Remove Quotes from Cells in Excel

  • Select cell B12 and enter the following formula.
=SUBSTITUTE(B5, """", "")
  • Apply the same formula to the remaining cells by AutoFilling down and right.
  • All the quotes will be removed from Excel cells.

28- using formulas to remove quotes in Excel


What Happens When We Directly Input Quotes in Excel Formula Bar?

We want to type the text in quotes directly in the Excel Formula Bar.

= “Good Morning!”

The result, however, does not have double quotes.

32- result if we type a text in quotes directly in the Excel Formula Bar

If we directly use the double quotes in the sentence like below:

=” Good Morning “EVERYONE” in the Classroom.”

This will cause an error like the below image.

29- an error occurred when we directly input quotes in the Excel Formula Bar


What Is the Limitation of Quotes in Excel?

One common problem is mistyping the formula or format syntax, which can result in unexpected errors.


Frequently Asked Questions

How do I prevent Excel from automatically converting numbers with leading zeros to dates?

To prevent Excel from converting numbers with leading zeros to dates, you can either format the cells as Text before entering the data or precede the number with a single quote (‘). For example, ‘00123 will be treated as text with leading zeros.

What is a smart quote?

When you type text, Word automatically converts straight quotation marks (‘ or “) into curly quotation marks (also called “smart quotes” or typographer’s quotes).

Why is Excel adding quotes to CSV?

This is completely normal. In this case, the outer quotes are used because it’s a string. To escape it, the inner quote is doubled. This is similar to what you’d see in a SQL query.


Quotes in Excel: Knowledge Hub


<< Go Back to Concatenate Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Nujat Tasnim
Nujat Tasnim

Nujat Tasnim, BSc in Computer Science and Engineering from American International University-Bangladesh, has a year-long tenure with ExcelDemy. Initially a Content Developer at SOFTEKO, she transitioned to the Software Team as Junior Software Quality Assurance Engineer. Currently serving as a Junior SQA Engineer at SOFTEKO, she excels in SDLC, STLC, and requirement analysis and possesses profound insights into OOP-related software development processes. Nujat is also proficient in design software like Photoshop and Illustrator, contributing diverse skills to her... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo