LEFT / MID / RIGHT vs TEXTBEFORE / TEXTAFTER / TEXTSPLIT

LEFT vs MID vs RIGHT

Choose the right Excel text extraction function for codes, IDs, names, and imported values that need to be split by position.

Quick verdict

  • Use LEFT, MID, and RIGHT for fixed-position extraction. Use TEXTBEFORE, TEXTAFTER, and TEXTSPLIT in modern Excel when values are separated by a delimiter.

Position-based extraction

  • LEFT returns characters from the start of a text string.
  • RIGHT returns characters from the end of a text string.
  • MID returns characters from the middle when you know the start position and length.

Modern alternatives

  • TEXTBEFORE and TEXTAFTER are easier when a delimiter separates the value you need.
  • TEXTSPLIT is better when one cell should become multiple columns or rows.

Frequently asked questions

  • When should I use MID instead of LEFT? Use MID when the value you need starts in the middle and you know the start position and length (IDs with fixed segments).
  • Are TEXTSPLIT and TEXTBEFORE better than MID? Yes in Microsoft 365 when a delimiter separates the parts. Use LEFT/MID/RIGHT for fixed-width codes.
  • How do I extract before a hyphen? Legacy: =LEFT(A1,FIND("-",A1)-1). Modern: =TEXTBEFORE(A1,"-").