How to Extract Text from a Cell in Excel

If you just need to extract text from a cell in excel and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: use =LEFT(text, n) to take the first n characters, =RIGHT(text, n) to take the last n, and =MID(text, start, n) to take n characters beginning at a position — the three text-extraction functions.

Syntax

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

Arguments

ArgumentDescription
textrequiredThe source text or cell to extract characters from.
num_charsrequiredHow many characters to return; for MID this is the length of the slice.
start_numoptionalMID only: the position of the first character to return (1 = the first character).

Related functions

TRIMSUBSTITUTETEXTJOIN
ƒxText to Columns SplitterLive
Columns found
3

3 rows

Ada LovelaceLondon1815
Grace HopperNew York1906
Alan TuringLondon1912
Runs entirely in your browser — your data never leaves this page.
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

What this does

LEFT, RIGHT and MID pull a slice of characters out of a longer string. LEFT takes characters from the start, RIGHT from the end, and MID takes a run of characters beginning at a position you give it. LEFT and RIGHT each need just the text and a count; MID needs the text, the starting position, and how many characters to take. Paired with FIND or SEARCH (which return the position of a character such as a space), they split first and last names dynamically without hard-coding lengths. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “extract text from a cell in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a layout choice that keeps the sheet readable and sortable useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

Take the product code "ABC123" in A2. =LEFT(A2, 3) returns "ABC", =RIGHT(A2, 3) returns "123", and =MID(A2, 4, 3) returns "123" by starting at the 4th character. To split a full name in B2 like "Maria Klein" at the space: =LEFT(B2, FIND(" ", B2) - 1) returns "Maria", and =MID(B2, FIND(" ", B2) + 1, 100) returns "Klein" — FIND locates the space so the formula works whatever the name length. LEFT, RIGHT and MID are the everyday tools for splitting codes, names and IDs into parts — area codes, file extensions, first and last names — especially when teamed with FIND or SEARCH for variable-length data. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.

In Google Sheets

Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. The short version of “extract text from a cell in excel”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.

Common mistakes

  • Mixing up MID arguments — the order is text, start_num, then num_chars, not text, length, start; the second number is where to begin.
  • Using a fixed number of characters for names or codes of varying length; combine with FIND or SEARCH so the count adapts to each cell.
  • Counting MID positions from 0 — the first character is position 1, so =MID(A2, 1, 3) takes the first three characters.

Frequently asked questions

How do I extract text before a space or symbol?

Combine LEFT with FIND: =LEFT(A2, FIND(" ", A2) - 1) returns everything before the first space. Subtracting 1 stops the result just short of the space itself.

What is the difference between MID and LEFT or RIGHT?

LEFT and RIGHT always start at one end of the text, while MID starts at any position you specify. Use MID when the characters you want are in the middle, not at the start or end.

How do I get the last characters of a cell?

Use RIGHT with the count you need: =RIGHT(A2, 4) returns the final four characters. To take everything after a symbol, pair RIGHT with LEN and FIND to compute the remaining length.

Other ways people ask this

On the way here you may have searched this as “excel extract text from cell”, “how to extract certain text from a cell in excel”, “excel formula to extract text from cell” and “how to extract text from cell in excel” — it is all the same task, and this page is the single, complete answer to it.

Why do people search for this in so many different ways?

Because the same task has many names. “excel extract text from cell”, “how to extract certain text from a cell in excel”, “excel formula to extract text from cell” all point at the one operation explained on this page, which is why they all lead here.