Excel LEFT Before a Character: Formula and Examples

Formulas & functions · Updated November 19, 2026

To return the text to the left of a character in Excel, put the text in A2 and use =LEFT(A2,FIND(",",A2)-1) to extract everything before the first comma. For example, if A2 contains Garcia, Elena, the result is Garcia; replace the comma in the formula with the character you need to find.

The basic formula for text before a character

The formula combines two functions. FIND locates the delimiter and returns its position in the text; LEFT returns the characters before that position. The subtraction of 1 matters because the delimiter itself should not be included in the result. If the comma is the eighth character, for example, the formula asks LEFT for seven characters.

For this example, the cell layout is A2 containing Garcia, Elena, with a comma as the delimiter. The formula returns Garcia.

=LEFT(A2,FIND(",",A2)-1)

FIND counts character positions starting at 1, not 0. LEFT uses that count to take the requested number of characters from the start of the cell. This approach works when the delimiter’s position changes from one row to another, so it is more flexible than typing a fixed character count into LEFT.

How to apply it down a column

For a list of names, product codes, or other values separated by the same character, enter the formula beside the first item and fill it down. In Excel for Microsoft 365 on Windows:

  1. Put the original text in column A, starting in A2.
  2. Click B2 and enter the formula, changing the delimiter to match your data.
  3. Press Enter and check that the result stops just before the delimiter.
  4. Use the fill handle at the lower-right corner of B2 to copy the formula down the rows.

Excel adjusts the relative reference as the formula is filled: the next row refers to A3, then A4, and so on. If the source data is in an Excel table, entering a formula in a table column normally fills it through that calculated column automatically.

On Windows, Ctrl+C and Ctrl+V can copy and paste a formula, while the fill handle is often quicker for a contiguous list. On Mac, the equivalent copy and paste shortcuts are Command+C and Command+V; the formula itself is the same. Excel for the web also supports the formula and fill handle, though its interface is browser-based.

Choose the right delimiter and occurrence

Change the character inside FIND to match the actual separator in your cell. Common choices include a comma, hyphen, slash, colon, or space. The delimiter must be enclosed in straight double quotation marks because it is a text value. For a hyphen-separated code such as AB-482-blue, the formula will return the portion before the first hyphen, AB.

FIND returns the position of the first matching character. If the cell contains multiple commas, the basic formula stops at the first one. Thus, with North, West, Zone 4 in A2, it returns North, not North, West. This is usually appropriate for a first-name/last-name split or a prefix before a separator, but it may not fit every data layout.

For data where you need the part before the last comma rather than the first, the newer TEXTBEFORE function can specify which occurrence to use. TEXTBEFORE is available in Microsoft 365 and Excel 2024; it is not available in every older Excel release. With A2 containing North, West, Zone 4, the following formula returns North, West.

For this example, A2 contains the text above and the delimiter is a comma. The third argument of -1 requests the last occurrence.

=TEXTBEFORE(A2,",",-1)

If your version does not include TEXTBEFORE, the basic FIND formula still handles the first occurrence. Extracting text before a later occurrence with older functions requires a longer formula, so first consider whether the data can be split using Excel’s Text to Columns feature or cleaned into a more consistent format.

What happens when the character is missing?

FIND returns a #VALUE! error when it cannot find the requested character. That means the basic formula also returns an error for a row without a delimiter. This is not necessarily a problem: the error can reveal inconsistent source data that needs checking. For instance, a list expected to have a comma in every row may contain an entry pasted in a different format.

If you prefer to show the original text when the delimiter is absent, wrap the extraction in IFERROR. For this example, A2 contains a value that may or may not include a comma; the formula returns the text before the first comma when present and the complete original value when absent.

=IFERROR(LEFT(A2,FIND(",",A2)-1),A2)

Consider whether returning the whole cell is the right fallback. It is convenient when a missing delimiter means the value is already a complete label. If the missing delimiter signals a bad record, hiding the error may make the problem harder to notice. You could instead use a clear message or flag the row for review, depending on how the workbook is used.

A blank A2 produces a blank result with this IFERROR version, because the attempted search fails and the fallback is the blank cell. A delimiter at the very start of the text produces an empty result: there are zero characters before it. If that outcome seems unexpected, inspect the source cell for a leading delimiter or an invisible character.

Spaces and messy imported data

A space is a valid delimiter, but it can produce results that depend on the exact spacing. If A2 contains Elena Garcia and you search for a space, the result is Elena. If the text starts with spaces, however, the first space may be found immediately and the extracted result may be empty. Repeated spaces can also cause a split at a different point than intended.

Do not automatically remove spaces from every result. In names and addresses, spaces inside the extracted text are meaningful. If the issue is unwanted leading or trailing spaces around the result, TRIM can clean those outer spaces, but TRIM also reduces repeated internal spaces to single spaces. That change may not be desirable for every kind of source data.

For this example, A2 contains Elena Garcia with spaces before the name. The formula returns Elena after trimming the extracted part.

=TRIM(LEFT(A2,FIND(" ",TRIM(A2))-1))

This particular formula first trims A2 for the search and then trims the extracted result. It is useful for ordinary text with accidental spaces, but it is not a universal cleanup method: TRIM is designed for standard space characters and will not remove every kind of invisible whitespace that can arrive from a website or external system. If a result still looks wrong, inspect the original data or use Excel’s cleaning tools before changing a whole dataset.

LEFT and FIND compared with TEXTBEFORE

The LEFT-and-FIND method is widely useful because it combines long-standing functions and makes the steps visible: locate the delimiter, then take the characters before it. It is a good choice when a workbook must remain compatible with older Excel versions or when the delimiter is expected to occur once.

TEXTBEFORE states the task more directly and can handle a selected occurrence without building a more elaborate expression. It also has optional arguments for matching behavior and a value to return when no delimiter is found. Those options can make a formula easier to read, but recipients of the workbook need a version that supports the function. Microsoft 365 and Excel 2024 support TEXTBEFORE; older releases may show a function-name error.

Excel’s Text to Columns command is another option when you want to split a whole range into separate columns as a one-time operation. On Windows, select the source cells and choose Data > Text to Columns, then follow the wizard to specify a delimiter. Unlike a formula, the resulting split is generally a set of values rather than a live extraction that recalculates when the source cell changes. Keep a copy of the original data before using it, especially if adjacent columns contain information that could be overwritten.

Related task: return the text after a character

“Left of a character” means the text before it. If you actually need the text after the delimiter, LEFT is not the right direction: the formula must start after the delimiter and take the remaining characters. In Microsoft 365 or Excel 2024, TEXTAFTER is the direct counterpart to TEXTBEFORE. In the example below, A2 contains Garcia, Elena; the formula returns Elena, including the space after the comma.

=TEXTAFTER(A2,",")

If you want to remove that leading space, one option is TRIM. For older Excel versions, MID, FIND, and LEN can extract the remainder after the first comma. With A2 containing Garcia, Elena, this formula returns Elena, including its initial space.

=MID(A2,FIND(",",A2)+1,LEN(A2))

Be clear about whether the delimiter belongs in the output. To exclude it from a result, the start position must be one character after its position; to include it, use the delimiter’s position itself. This distinction is the reverse of the subtraction in the LEFT formula, which reduces the character count so the delimiter is left out.

Frequently Asked Questions

Does LEFT search for a character by itself?
No. LEFT returns a specified number of characters from the start of text. FIND or SEARCH locates a character; combining the two lets the number of characters vary with the delimiter’s position.

How do I get everything before a hyphen?
Use the same pattern with a hyphen as the delimiter. If A2 contains AB-482-blue, =LEFT(A2,FIND("-",A2)-1) returns AB. This uses the first hyphen.

What if there are two commas?
The FIND-based formula uses the first comma. If you need the text before the last comma and have Microsoft 365 or Excel 2024, use TEXTBEFORE with -1 as its occurrence argument. Confirm which occurrence matches the structure of your data.

Why does my formula show #VALUE!?
Usually, the delimiter is not present exactly as specified, or it differs from what is visible in the cell. Check for a different punctuation mark, an extra space, or inconsistent rows. IFERROR can provide a fallback, but it is better to use it only when that fallback makes sense.

Can I use this with a space between words?
Yes. Use a space between the quotation marks as the FIND delimiter. The formula returns the text before the first space, so a name with several words will be split at its first space unless you use a method designed for a different occurrence.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.