Double quotes inside a formula

An excel formula to double quotes inside a formula

Related Functions

Sponsored Link

=""""&A1&""""

If you need to include double quotes inside a formula, you can use additional double quotes as "escape characters". By escaping a character, you are asking Excel to to treat the " character as literal text. As always, you'll also need to include double quotes wherever you would normally in a formula.

For example, if cell A1 contains the text: The Graduate and you want wrap that text inside double quotes (""), you can use this formula:

=""""&A1&""""

Because the text on either side of A1 consists of only of a double quote, you need """" . The outer quotes (1 & 4) tell Excel this is text, the 2nd " tells Excel to escape the next character, double quote 3 is included as literal text.

If you want to add the movie to other text to create, you can concatenate the movie title inside double quotes with a formula like this:

 
="The 1960's movie """ &A1&""" is famous"

The result: The 1960's movie "The Graduate" is famous

Working with extra double quotes can get confusing fast, so another way to do the same thing is to use the CHAR function with the number 34:

 
="The 1960's movie "&CHAR(34)&A1&CHAR(34)& " is famous"

In this case, CHAR(34) returns the double quote character (") which is included in the result as literal text.

CHAR is handy for adding other text that is hard to work with in a formula as well. For example, you can use CHAR(13) to insert a line break character into a formula on Windows. On a Mac, use CHAR(10).

Sponsored Link

0 votes. 0 / 5