ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Text
  3. Remove Text After a Character in Excel (Keep the Start)

Remove Text After a Character in Excel (Keep the Start)

By ExcelReady Team·Updated November 2, 2026·7 min read

The short answer

To remove text after a character in Excel, keep only the part before it. In Microsoft 365 or Excel 2024, use =TEXTBEFORE(A2,"-"). In any version, use =LEFT(A2,FIND("-",A2)-1): FIND gets the position of the dash and LEFT keeps the characters before it. For a one-off clean-up, use Find and Replace with -* and an empty Replace box.

Key takeaways

  • =TEXTBEFORE(A2,"-") keeps everything before the first dash; it needs Microsoft 365 or Excel 2024.
  • =LEFT(A2,FIND("-",A2)-1) does the same in every version. Drop the -1 to keep the dash itself.
  • Use an instance number, like =TEXTBEFORE(A2,"-",-1), to cut at the last dash instead of the first.
  • Both formulas return an error when the character is missing, so wrap them in IFERROR or use TEXTBEFORE's if_not_found argument.
  • Find and Replace with -* removes the text for good, with no formula left behind.
On this page+
  1. Which method should you use?
  2. How to remove text after a character with TEXTBEFORE
  3. How to remove text after a character with LEFT and FIND
  4. How to remove text after the last or the second delimiter
  5. Remove text after a comma, space, @ or bracket
  6. What if the character isn't in the cell?
  7. How to remove text after a character without a formula
  8. Practise it

To remove text after a character in Excel, you keep the start of the cell and drop everything from the character onwards. The quickest formula is TEXTBEFORE in Microsoft 365 or Excel 2024; in older versions, LEFT with FIND does the same job. This guide shows both, plus a no-formula method, for product codes, email addresses, city names and anything else with a dash, comma, @ or space in the middle.

Which method should you use?#

Pick a formula if the data will change or you want to keep the original column, and Find and Replace if you only need to clean the data once. Here is the short version:

MethodWorks inResultBest for
=TEXTBEFORE(A2,"-")Microsoft 365, Excel 2024Live formulaThe easiest formula
=LEFT(A2,FIND("-",A2)-1)Every versionLive formulaFiles shared with older Excel
Find and Replace with -*Every versionText is changed in placeOne-off clean-ups
Flash Fill (Data > Flash Fill)Excel 2013 and laterTyped valuesQuick, irregular patterns

All the examples below use these product codes in A2:A6:

A
1Product Code
2Laptop-15-Silver
3Monitor-27-Black
4Keyboard-UK-White
5Mouse-Wireless-Grey
6Dock-USBC-Black

How to remove text after a character with TEXTBEFORE#

TEXTBEFORE returns the text that comes before a delimiter, which is the character or text you split at. In B2, type:

Excel formula
=TEXTBEFORE(A2,"-")

The result is Laptop. Fill it down (Windows: Ctrl+D; Mac: ⌘D) and you get Monitor, Keyboard, Mouse and Dock. The full syntax is:

Excel formula
=TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])

Only the first two parts are required. The others are optional:

  • instance_num picks which dash to cut at. 2 means the second dash, and -1 means the last one.
  • match_mode set to 1 ignores capital letters, which matters only when the delimiter is a word.
  • if_not_found is what to show when the delimiter is missing, instead of #N/A.

TEXTBEFORE needs Microsoft 365 or Excel 2024. In older versions it shows #NAME?. The guide to TEXTBEFORE and TEXTAFTER covers the mirror function, TEXTAFTER, which keeps the end instead.

How to remove text after a character with LEFT and FIND#

In any version of Excel, combine FIND, which returns the position of a character, with LEFT, which keeps a number of characters from the start:

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

Work through it for Laptop-15-Silver:

  1. FIND("-",A2) returns 7, because the dash is the 7th character.
  2. 7-1 is 6, the number of characters before the dash.
  3. LEFT(A2,6) returns Laptop.

The -1 is what removes the character itself. To keep the dash and drop only what comes after it, leave it out: =LEFT(A2,FIND("-",A2)) returns Laptop-.

FIND is case-sensitive and SEARCH is not. For a dash, comma or @ the choice doesn't matter, but for a letter or a word it does. The article on FIND and SEARCH in Excel explains the difference, and the LEFT function guide and FIND function guide give the full syntax. For a side-by-side look at the two approaches, read LEFT vs TEXTBEFORE.

How to remove text after the last or the second delimiter#

To cut at a later delimiter, give TEXTBEFORE an instance number. Positive numbers count from the start and negative numbers count from the end:

FormulaResult for Laptop-15-Silver
=TEXTBEFORE(A2,"-")Laptop
=TEXTBEFORE(A2,"-",2)Laptop-15
=TEXTBEFORE(A2,"-",-1)Laptop-15

With two dashes, the second dash and the last dash are the same one. With a code like SKU-1042-BLK-L, =TEXTBEFORE(A2,"-",-1) returns SKU-1042-BLK, which removes only the size at the end.

Older Excel has no instance number, so the formula is longer. This version replaces the last dash with a ~ and then finds the ~:

Excel formula
=LEFT(A2,FIND("~",SUBSTITUTE(A2,"-","~",LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))))-1)

LEN(A2)-LEN(SUBSTITUTE(A2,"-","")) counts the dashes, and SUBSTITUTE swaps only that last one. For SKU-1042-BLK-L it also returns SKU-1042-BLK. Pick a swap character that never appears in your data.

Remove text after a comma, space, @ or bracket#

The same formulas work with any delimiter. Just change the text in quotes, and include a space in it when the data has one:

Text in A2FormulaResult
Paris, France=TEXTBEFORE(A2,",")Paris
maria.lopez@northwind.com=TEXTBEFORE(A2,"@")maria.lopez
Invoice 2291 (paid)=TEXTBEFORE(A2," (")Invoice 2291
Jordan Price=LEFT(A2,FIND(" ",A2)-1)Jordan

If you split at "(" instead of " (", the result is Invoice 2291 followed by a space. You can't see it, but it stops lookups and COUNTIF from matching. Either include the space in the delimiter or wrap the formula in TRIM: =TRIM(TEXTBEFORE(A2,"(")).

To pull out a piece from the middle instead, such as the 15 in Laptop-15-Silver, see how to extract text between two characters.

What if the character isn't in the cell?#

Both formulas return an error when the delimiter is missing: TEXTBEFORE gives #N/A and FIND gives #VALUE!. A single code without a dash can break a whole column. Decide what you want instead, usually the original text:

Excel formula
=TEXTBEFORE(A2,"-",,,,A2)
=IFERROR(LEFT(A2,FIND("-",A2)-1),A2)

The first uses TEXTBEFORE's sixth argument, if_not_found. The commas skip the optional arguments you don't need. The second wraps the older formula in IFERROR. Both return the whole cell when there's no dash, so Webcam stays Webcam.

How to remove text after a character without a formula#

Find and Replace can delete everything after a character in one go, using the * wildcard, which matches any number of characters:

  1. Select the column. If you skip this, Excel replaces across the whole sheet.
  2. Press Ctrl+H (Mac: Control+H) to open Replace.
  3. In Find what, type -*. In Replace with, type nothing.
  4. Click Replace All.

Laptop-15-Silver becomes Laptop. To keep the dash, replace -* with -. This changes the cells themselves, so copy the column first or press Ctrl+Z (Mac: ⌘Z) straight away if it goes wrong. Find and Replace can't target the last dash, so use a formula for that. For other ways to strip characters, such as removing every dash or the first few characters, read how to remove characters in Excel.

Practise it#

Practise TEXTBEFORE and TEXTAFTER in a live spreadsheet: you split emails, names and file paths and the sheet checks each formula as you type. Then practise FIND and SEARCH to build the LEFT and FIND version that works in every Excel. Or start with the exercise on this page: one product code, one formula.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Each product code starts with the product name, then a dash. In B2, keep only the text before the first dash in A2 with LEFT and FIND, then press Enter.

fx
ABCD
1
Product Code
Product
2
Laptop-15-Silver
3
Monitor-27-Black
4
Keyboard-UK-White
5
Mouse-Wireless-Grey
6
Dock-USBC-Black
7
8
9

Tip: FIND("-",A2) gives the position of the dash. Take 1 away so LEFT stops just before it.

Practise this in a lesson

LessonTEXTBEFORE and TEXTAFTERSplit emails, "Last, First" names and file paths at a delimiter with TEXTBEFORE and TEXTAFTER, including picking which occurrence to split at.LessonFIND and SEARCHLocate a character or word inside text with FIND or SEARCH, then use that position to split names and pull out order numbers.Function guideLEFTPull the first characters from a cell with Excel's LEFT: prefixes, initials and first names. Examples, pitfalls and live practice.Function guideFINDLocate a character inside text with Excel's FIND, then use it with LEFT, MID and RIGHT. Case rules, #VALUE! fixes and a live exercise.

Frequently asked questions

How do I remove everything after a character in Excel?

+

Use =TEXTBEFORE(A2,"-") in Microsoft 365 or Excel 2024, or =LEFT(A2,FIND("-",A2)-1) in any version. Replace the dash with your own character, such as a comma, @ or space.

How do I remove text after the last occurrence of a character?

+

In Microsoft 365 or Excel 2024, give TEXTBEFORE a negative instance number: =TEXTBEFORE(A2,"-",-1). It counts from the end, so it cuts at the last dash.

How do I delete text after a character without a formula?

+

Select the column, press Ctrl+H, type the character followed by an asterisk (like -*) in Find what, leave Replace with empty and click Replace All. The asterisk matches everything after the character.

Why does my LEFT and FIND formula return #VALUE!?

+

FIND returns #VALUE! when the character is not in the cell. Wrap the formula in IFERROR to keep the original text: =IFERROR(LEFT(A2,FIND("-",A2)-1),A2).

Can I keep the character and remove only what comes after it?

+

Yes. Leave out the -1: =LEFT(A2,FIND("-",A2)) keeps the text up to and including the dash.

Sources

  • TEXTBEFORE function - Microsoft Support
  • LEFT, LEFTB functions - Microsoft Support
  • FIND, FINDB functions - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. Which method should you use?
  2. How to remove text after a character with TEXTBEFORE
  3. How to remove text after a character with LEFT and FIND
  4. How to remove text after the last or the second delimiter
  5. Remove text after a comma, space, @ or bracket
  6. What if the character isn't in the cell?
  7. How to remove text after a character without a formula
  8. Practise it

Keep reading

Text· 7 min read

TEXTBEFORE and TEXTAFTER in Excel

TEXTBEFORE returns the text before a delimiter, and TEXTAFTER returns the text after it. =TEXTBEFORE(A2,"@") gives the username of an email, and =TEXTAFTER(A2,"@") gives the domain. A third argument picks which occurrence: -1 means the last one. They need Microsoft 365, Excel for the web or Excel 2024; in older Excel, use LEFT or MID with FIND.

Text· 6 min read

Extract Text Between Two Characters in Excel

To extract text between two characters in Microsoft 365, nest TEXTAFTER inside TEXTBEFORE: =TEXTBEFORE(TEXTAFTER(A2,"("),")") returns what sits between the brackets. In any version, use MID and FIND: =MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1). FIND gives the positions of the two characters, and MID takes the text between them.

Text· 6 min read

How to Remove Characters From Text in Excel

To remove a specific character, use SUBSTITUTE to replace it with nothing: =SUBSTITUTE(A2,"-","") strips every dash. To remove characters by position, use RIGHT(A2,LEN(A2)-3) to drop the first three, or LEFT(A2,LEN(A2)-2) to drop the last two. To remove everything after a character, use TEXTBEFORE or LEFT with FIND.

More on text

  • REPT in Excel: Simple In-Cell Bar Charts
  • Sort by Last Name in Excel When Names Are in One Column
  • How to Split an Address Into Columns in Excel
  • How to Split First and Last Names in Excel
  • Standardize Inconsistent Data in Excel: One Spelling Each
  • SUBSTITUTE and REPLACE in Excel
All text articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free