How do I extract text between quotes in Excel?

The process of extracting text between quotes in Excel involves using a combination of built-in functions and formulas. This allows users to isolate specific text within a cell or a range of cells that is enclosed in quotation marks. By using the FIND and MID functions, users can locate the position of the opening and closing quotation marks, and then use the MID function to extract the text in between. This can be useful for cleaning up data or extracting specific information from a large dataset. With the correct formula, the process can be automated and applied to multiple cells at once, saving time and effort.

Excel: Extract Text Between Quotes


You can use the TEXTBEFORE and TEXTAFTER functions in Excel to extract all text in a cell between quotes.

There are two common ways to use these functions:

Method 1: Extract Text Between Double Quotes

=TEXTBEFORE(TEXTAFTER(A2, """"), """")

Method 2: Extract Text Between Single Quotes

=TEXTBEFORE(TEXTAFTER(A2, "'"), "'")

Both examples extract the text between the quotes from cell A2.

The following examples show how to use each method in practice.

Example 1: Extract Text Between Double Quotes in Excel

Suppose we have the following list of athletes with their nicknames in double quotes:

Now suppose we would like to extract the text between the double quotes in Excel.

We can type the following formula into cell B2 to extract the text between the double quotes in cell A2:

=TEXTBEFORE(TEXTAFTER(A2, """"), """")

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

Column B now contains the text between the double quotes for each corresponding cell in column A.

Example 2: Extract Text Between Single Quotes in Excel

Suppose we have the following list of athletes with their nicknames in single quotes:

Now suppose we would like to extract the text between the single quotes in Excel.

We can type the following formula into cell B2 to extract the text between the single quotes in cell A2:

=TEXTBEFORE(TEXTAFTER(A2, "'"), "'")

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

Column B now contains the text between the single quotes for each corresponding cell in column A.

Additional Resources

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

x