From “Name: Ann Lee” or “Total=42,” pull the value after the label. SEARCH for the label, then take everything after it — great for parsing semi-structured text.
The example
The value following a label.
| A | B | |
|---|---|---|
| 1 | Text | After 'Name:' |
| 2 | ID: 7 | Name: Ann Lee | Ann Lee |
The formula
Everything after the label:
How it works
Locate the label, skip past it:
SEARCH("Name:", A2)returns where the label starts (case-insensitive).- Add
LEN("Name:")to jump past the label to the value. MID(…, 100)grabs the rest;TRIMremoves the leading space.- If the value ends at a delimiter (like
|), useTEXTBEFORE/FIND to stop there instead of taking everything.
Value between two labels: combine — take text after “Name:” and before the next delimiter. In 365, =TEXTBEFORE(TEXTAFTER(A2,"Name: "), "|") isolates a field cleanly.
Try it: interactive demo
Text and a label.
Variations
Stop at a delimiter
Field between labels:
365 simple
After the label:
Numeric value
Convert the result:
Pitfalls & errors
Label not found = error. SEARCH errors if the label is missing — wrap with IFERROR.
Include the colon/space. Search for the full label (“Name:”) so you land right before the value.
Taking too much. MID(…,100) grabs to the end; stop at a delimiter if other fields follow.
Practice workbook
Frequently asked questions
How do I extract the value after a label in Excel?
How do I stop at the next field?
What if the label isn't there?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class