To extract certain words from an Excel cell, use the TEXTBEFORE, TEXTAFTER, and TEXTSPLIT functions if you have Microsoft 365 or Excel 2021 and later. For older versions, combine LEFT, RIGHT, MID, FIND, and SEARCH. There is no single built-in “extract word” button; you pick the function that matches where the word sits in the cell.

What You'll Need

  • Excel 365, Excel 2021, or Excel 2019 (the newer text functions are only in 365 and 2021+).
  • A column of cells containing the text you want to extract from.
  • An empty column to the right for the results.
  • Basic familiarity with typing formulas and dragging the fill handle.

Step-by-Step

  1. Identify the pattern. Look at a few cells and decide whether the word you want is always before a delimiter (space, comma, dash), always after it, always the second word, or always a fixed number of characters from the left or right. The formula depends on that pattern.
  2. Extract text before a delimiter. If the word sits before a space, type =TEXTBEFORE(A2," ") in the result cell. Replace A2 with your first data cell. This returns everything before the first space.
  3. Extract text after a delimiter. For the word after a space, use =TEXTAFTER(A2," "). To get the second word specifically, use =TEXTBEFORE(TEXTAFTER(A2," ")," ").
  4. Extract the nth word. Use =INDEX(TEXTSPLIT(A2," "),1,2) to return the second word. Change the last number to pick a different word position. TEXTSPLIT is available in Excel 365 and Excel 2021+.
  5. Extract a fixed number of characters. For the first 5 characters, use =LEFT(A2,5). For the last 5, use =RIGHT(A2,5). For characters starting at position 3, use =MID(A2,3,5).
  6. Extract text between two markers. If the word sits between a dash and a space, use =TEXTBEFORE(TEXTAFTER(A2,"-")," "). This pulls everything after the dash and before the next space.
  7. Handle older Excel versions. If TEXTBEFORE and TEXTAFTER are not available, use =LEFT(A2,FIND(" ",A2)-1) for the first word, or =MID(A2,FIND(" ",A2)+1,FIND(" ",A2,FIND(" ",A2)+1)-FIND(" ",A2)-1) for the second word. These formulas are longer but work in Excel 2016 and later.
  8. Fill down. Drag the fill handle from the corner of the result cell down the column. Check a few rows to confirm the pattern holds; if a cell has extra spaces or a different delimiter, the formula may return an error or the wrong text.
  9. Convert to values if needed. Select the result column, copy it, then paste as Values (right-click > Paste Special > Values) so the extracted words stay fixed if the source data changes.

Menu labels and function availability can differ slightly by Excel version, device, and region. The steps above are written for Excel on Windows and Mac desktop; the web version supports the same functions but the right-click menu may look different.

Common Mistakes

  • Using the wrong delimiter. A formula built for a space fails on cells that use commas or dashes. Check a sample of cells first.
  • Forgetting to lock references. If you copy a formula across columns, use $A2 or $A$2 as needed so the source cell does not shift.
  • Assuming every cell follows the pattern. One cell with two spaces instead of one can return an error. Use IFERROR to catch it: =IFERROR(TEXTBEFORE(A2," "),"").
  • Typing the delimiter without quotes. TEXTBEFORE(A2, ) is invalid; the delimiter must be in quotes, like " ".
  • Expecting TEXTBEFORE in Excel 2019. Those functions are not in Excel 2019 or earlier; use the FIND/MID combination instead.

Tips

  • Use TRIM(A2) inside your formula to remove extra spaces before extracting: =TEXTBEFORE(TRIM(A2)," ").
  • Use SEARCH instead of FIND when the delimiter case might vary; SEARCH is not case-sensitive.
  • Test your formula on three or four rows before filling the whole column.
  • Keep a copy of the original column so you can compare results and fix pattern mismatches.
  • If you need to extract many different words, consider using Power Query (Data > Get & Transform Data) to split columns by delimiter, which is more visual than nested formulas.

Troubleshooting

  • #VALUE! error: The delimiter was not found in that cell. Wrap the formula in IFERROR or check for leading/trailing spaces.
  • #NAME? error: The function name is misspelled or your Excel version does not support it (TEXTBEFORE, TEXTAFTER, TEXTSPLIT require 365 or 2021+).
  • Wrong word returned: Count the delimiters. If a cell has two spaces, the “second word” formula may return an empty string. Use TRIM first.
  • Formula works on one row but not others: The pattern is inconsistent. Sort or filter the column to spot cells with different delimiters, then adjust the formula or clean the data.
  • Results change when source data changes: That is expected with formulas. Paste as Values to freeze the extracted words.

Frequently Asked Questions

Can I extract a word that appears in different positions in different cells?

Not with a single simple formula unless the word is always between the same two delimiters. You would need a more complex formula using FIND and MID, or use Power Query to split and filter. For one-off jobs, Text to Columns (Data > Text to Columns) can split by delimiter and let you pick the column.

Does TEXTBEFORE work in Excel 2019?

No. TEXTBEFORE, TEXTAFTER, and TEXTSPLIT are available in Excel for Microsoft 365 and Excel 2021 and later. In Excel 2019 and earlier, use LEFT, RIGHT, MID, and FIND instead.

How do I extract the last word in a cell?

In Excel 365 or 2021+, use =TEXTAFTER(A2," ",-1). The -1 tells Excel to start from the end. In older versions, use =TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100)).

Can I extract words from multiple cells at once?

Yes. Write the formula in the first result cell, then drag the fill handle down. Each row uses its own source cell. If you need to extract from several columns, copy the formula across and adjust the column references.

What if my delimiter is a comma instead of a space?

Replace the space in quotes with a comma: =TEXTBEFORE(A2,","). For a comma followed by a space, use ", ".

Is there a way to extract words without formulas?

Yes. Use Data > Text to Columns with a delimiter to split the cell into separate columns, then delete the columns you do not need. This is a one-time static split, not a live formula.