ExcelTool.io

LEFT, RIGHT & MID

Extract a fixed number of characters from the start, end, or middle of a text value.

Syntax

=LEFT(text, num_chars) =RIGHT(text, num_chars) =MID(text, start_num, num_chars)

Arguments

  • text - The text value to extract from.
  • num_chars - How many characters to return.
  • start_num (optional) - For MID, the position of the first character to return.

Examples

=LEFT(A2, 3)

Returns: First 3 characters of A2

Useful for codes and prefixes.

=MID(A2, 4, 2)

Returns: 2 characters starting at position 4

Pull a slice out of the middle.

Common Errors and Gotchas

  • These count characters, not words - combine with FIND/SEARCH to split at a delimiter.
  • For splitting columns interactively, the Text to Columns tool is easier.

Does LEFT, RIGHT & MID Work in Google Sheets?

Yes. LEFT, RIGHT & MID uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.

See Also