How to left extract prefix in Excel
Extract a two-letter country code, a department prefix, or the first word from a product code column.
Step-by-step instructions
How to left extract prefix — 3 steps
Reference the cell that contains the text you want to extract from.
Enter the number of characters you want as the second argument.
Copy the formula down the column to extract the same prefix from every row.
Example data
Worked example
| Product Code | Prefix |
|---|---|
| EUR-10045 | EUR |
| USD-20012 | USD |
| GBP-30001 | GBP |
Common mistakes
Errors to watch out for
Returns more characters than expected
Double-check the second argument. LEFT counts from the leftmost character, so LEFT(A2,3) returns exactly 3 characters.
Returns a number instead of text
If the source cell is formatted as a number, wrap it in TEXT first — for example, LEFT(TEXT(A2,"000000"),3).
FAQ
Frequently asked questions
How do I extract a variable-length prefix before a delimiter?
Combine LEFT with FIND — for example, =LEFT(A2,FIND("-",A2)-1) extracts everything before the first hyphen.
Describe your exact spreadsheet problem — get the formula in seconds.
Open AI Formula Generator — FreeRelated how-to guides