How to Escape Quotes in Excel (With Example)


There are two ways to escape quotes in formulas in Excel:

Method 1: Wrap Quotes Around Quotes

=CONCATENATE("""",A2,"""")

Method 2: Use CHAR(34)

=CONCATENATE(CHAR(34),A2,CHAR(34))

Both of these formulas will wrap the string in cell A2 in double quotes.

Note: The function CHAR(34) corresponds to double quotes in the current Unicode table.

The following examples show how to use each method in practice with the following list of strings in Excel:

Example 1: Wrap Quotes Around Quotes

We can type the following formula into cell B2 to wrap the string in cell A2 in double quotes:

=CONCATENATE("""",A2,"""")

We can then drag and fill this formula down to each remaining cell in column B:

Excel escape quotes

Notice that each cell in column B contains the corresponding cell in column A with double quotes wrapped around it.

Example 2: Use CHAR(34)

We can type the following formula into cell B2 to wrap the string in cell A2 in double quotes:

=CONCATENATE(CHAR(34),A2,CHAR(34))

We can then drag and fill this formula down to each remaining cell in column B:

Excel escape quotes using CHAR(34)

Notice that each cell in column B contains the corresponding cell in column A with double quotes wrapped around it.

Note that the function CHAR(34) corresponds to double quotes in the current Unicode table.

Thus, this formula concatenates one double quote at the beginning of the string in column A, then concatenates another double quote at the end of the string.

Note: You can find the complete documentation for the CHAR function in Excel here.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

How to Remove Quotes in Excel
How to Add Single Quotes in Excel
How to Extract Text Between Quotes in Excel

Featured Posts

Leave a Reply

Your email address will not be published. Required fields are marked *