Excel like a finance pro.
The functions, VBA, and shortcuts a finance operator actually uses — curated, with CFO examples. Prefer them pre-built? Grab a ready-made model.
TEXTBEFORE
Text & cleanupGrab everything before a delimiter — first names, street numbers, the local part of an email.
Difficulty
1What is it?
TEXTBEFORE returns the piece of a text string that sits before a delimiter you name — a space, a comma, an @, anything. It's the modern, readable replacement for the old LEFT(…, FIND(…)) contortion: give it the text and the marker to stop at, and it hands back the part in front. You can ask for the first occurrence or count from the end, and give it a fallback for when the delimiter isn't there. Microsoft 365 / Excel 2021+.
2What it looks like
TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])- text
- The string to pull from (a cell like a full name or address).
- delimiter
- The marker to stop before — " " for a space, ", " for a comma, "@" for an email.
- [instance_num]
- Which occurrence to stop at — 1 = the first (default); a negative counts from the end.
- [if_not_found]
- What to return when the delimiter isn't in the text (avoids a #N/A). It's the last argument.
3When you use it
- Split a first name off a "First Last" column.
- Take the local part of an email — everything before the @.
- Pull the street number that sits before the first space in an address.
4See it in action
Change the inputs — the formula and result update live. Prefer the real thing? Download the Excel file and open it in Excel.
Pull everything before the first space. Edit the name below — B2 holds it.
=TEXTBEFORE(B2, " ")Jane| A | B | C | |
|---|---|---|---|
| 1 | Field | Value | Result |
| 2 | Full name | Jane Doe | Jane |
The lime cell holds the formula — click it (or any cell) to see its contents in the bar above, just like Excel. Edit the blue cells to watch it recompute.
5Common errors
#N/AThe delimiter isn't in the text and no fallback was given.Fix: Add the if_not_found argument (the last one) — e.g. the original text, or "".
#NAME?You're on a version without TEXTBEFORE.Fix: Needs Microsoft 365 or Excel 2021+. Otherwise use LEFT(text, FIND(delimiter, text) - 1).
#VALUE!instance_num is 0.Fix: Use 1 for the first occurrence, or a negative number to count from the end.
6Better functions & alternatives
Want TEXTBEFORE already wired into a model? Wauvel's free tools download as branded, formula-driven Excel.
Learn the moves here — or let Wauvel run them on your numbers.
Get my free report →