Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to combine 2 or more chart types in a single chart in Excel
  • How To Create Frequency Distribution in Excel
  • Error Bars in Excel
  • How to sum a total in multiple Excel tables
  • Subtotal function in Excel

References

  • How to use Excel MATCH Function
  • Convert text string to valid reference in Excel using Indirect function
  • To count total rows in a range in Excel
  • Extract data with helper column in Excel
  • Excel Advanced Lookup using Index and Match Functions

Data Validations

  • Excel Data validation exists in list
  • Excel Data validation must begin with
  • Prevent invalid data entering in specific cells
  • Excel Data validation date in specific year
  • Excel Data validation allow weekday only

Remove text by matching in a cell in Excel

by

To remove text from a cell based by matching content (not location), you can use the SUBSTITUTE function.

Formula

=SUBSTITUTE(B6,text_to_remove,"")

Explanation

In the example shown, the formula in C6 is:

=SUBSTITUTE(B6,"-","")

How this formula works

The SUBSTITUTE function lets you replace text by matching content.

Worked Example:   How to count specific words in a range in Excel

In this case, we want to remove hyphens from telephone numbers. The SUBSTITUTE function can handle this easily — we just need to provide a cell reference (B6), the text to remove (“-“), and the an empty string (“”) for replacement text.

Worked Example:   Normalize text by removing punctuations, extra spaces and more in Excel

SUBSTITUTE will replace all instances of “-” with nothing.

Note that SUBSTITUTE is a case-sensitive function.

In case You Intend To Remove more than one thing

If you need to remove more than one thing, you can nest multiple SUBSTITUTE functions. For example, to remove square brackets from text, you can use:

=SUBSTITUTE(SUBSTITUTE(text, "[", ""), "]", "")

Post navigation

Previous Post:

Remove line breaks in a cell in Excel

Next Post:

Remove text by position in a cell in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF, AND, OR and NOT Functions Examples in Excel
  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel NOT Function
  • Check multiple cells are equal in Excel
  • IF function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Count times in a specific range in Excel
  • Check If Two Dates are same month in Excel
  • Count birthdays by month in Excel
  • Calculate date overlap in days in Excel
  • Get days between dates in Excel

Grouping

  • If cell contains one of many things in Excel
  • Map inputs to arbitrary values in Excel
  • Group arbitrary text values in Excel
  • Group times into unequal buckets in Excel
  • How to randomly assign people to groups in Excel

General

  • With vs Without Array Formula in Excel
  • How to get original number from percent change in Excel
  • How to set or clear a print area in Excel Worksheet
  • How to calculate total from percentage in Excel
  • How to test a range for numbers in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning