How to Remove Text between Two Characters in Excel (3 Easy Ways)

The dataset contains information about the names of some employees and their delivery times & dates of products. We do not want the delivery time which is in between two curly braces.

3 Ways to Remove Text between Two Characters in Excel


Method 1 – Remove Text between Two Characters in Excel with Find and Replace

We will remove the text between curly braces from the following image.

Remove Text between Two Characters in Excel with Find and Replace Options

STEPS:

  • Press Ctrl + H to open the ‘Find and Replace’ dialog box.
  • In the ‘Find what’ box, type an asterisk surrounded by two curly braces ({*}).
  • Keep the ‘Replace with’ box empty.
  • Click on the ‘Replace All’ button.

Remove Text between Two Characters in Excel with Find and Replace Options

  • Excel shows a message box how many replacements were made.
  • Click on OK.

  • Close the ‘Find and Replace’ dialog box.

Remove Text between Two Characters in Excel with Find and Replace Options

Read More: How to Remove Text After Character in Excel


Method 2 – Use Flash Fill to Remove Text between Two Characters in Excel

We’ll add a column for updated values.

Use Flash Fill to Remove Text between Two Characters in Excel

STEPS:

  • Select cell C5.
  • Type the expected result of cell B5 in cell C5.
  • Press Enter.

  • Start typing the relevant value of cell B6 in cell C6. Excel will show a preview of the remaining cells that follow the same pattern whenever it detects a pattern in the data you’re inputting.
  • Accept the suggestions by hitting Enter.

Use Flash Fill to Remove Text between Two Characters in Excel

  • We get the text of cell (B5:B9) in cell (C5:C9) without the instances between curly braces.

Read More: How to Remove Text before a Space with Excel Formula


Method 3 – Apply Excel Functions to Remove Text between Two Characters

We will use a combination of various functions to get the result in the column.

Apply Functions to Remove Text between Two Characters

STEPS:

  • Select cell C5.
  • Insert the following formula in that cell:
=IFERROR(SUBSTITUTE(B5,MID(LEFT(B5,FIND("}",B5)),FIND("{",B5),LEN(B5)),""),B5)
  • Press Enter.
  • We get the value of cell B5 in cell C5 without the text between curly braces.

Apply Functions to Remove Text between Two Characters

  • Drag the Fill Handle tool from cell C5 to C10 to copy the formula of cell C5 in other cells.

How Does the Formula Work?

  • LEN(B5): This part returns the length of a text string in cell B5.
  • FIND(“{“,B5): Finds the “{“ character in the string of cell B5.
  • MID(LEFT(B5,FIND(“}”,B5)),FIND(“{“,B5),LEN(B5)): This part measures the length of string “{“ from first position.
  • SUBSTITUTE(B5,MID(LEFT(B5,FIND(“}”,B5)),FIND(“{“,B5),LEN(B5)),””): Substitutes text between the characters “{“ with empty value.
  • IFERROR(SUBSTITUTE(B5,MID(LEFT(B5,FIND(“}”,B5)),FIND(“{“,B5),LEN(B5)),””),B5): If the previous part returns an error the IFERROR function returns the value of cell B5.

Read More: How to Remove Everything After a Character in Excel


Download the Practice Workbook


Related Articles

<< Go Back To Excel Remove Text | Data Cleaning in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mukesh Dipto
Mukesh Dipto

Mukesh Dipto is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including Rhino3D, Maxsurf C++, AutoCAD, HTML, CSS, JavaScript, and WordPress. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo