FP

FormulaPilot

Spreadsheet formula tools

Open generator
Excel how-to guide

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.

beginnerText ManipulationLEFT reference

Step-by-step instructions

How to left extract prefix3 steps

1

Reference the cell that contains the text you want to extract from.

2

Enter the number of characters you want as the second argument.

3

Copy the formula down the column to extract the same prefix from every row.

Example data

Worked example

Product CodePrefix
EUR-10045EUR
USD-20012USD
GBP-30001GBP

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.

Need a custom variation?

Describe your exact spreadsheet problem — get the formula in seconds.

Open AI Formula Generator — Free

Related how-to guides

Continue learning.