4.5 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsHow to Escape Quotes in Google Sheets (With Example)

How to Escape Quotes in Google Sheets (With Example)

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

There are two ways to escape quotes in formulas in Google Sheets:

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 Google Sheets:

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:

escape double quotes in Google Sheets

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:

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 Google Sheets here.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

How to Extract Substring in Google Sheets
How to Reverse a Text String in Google Sheets
How to Extract Numbers from String in Google Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories