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

Data Analysis

  • What-If Analysis: Scenarios and Goal Seek in Excel
  • How to create Checklist in Excel
  • How to sum a total in multiple Excel tables
  • Example of COUNTIFS with variable table column in Excel
  • Conditional Formatting Rules in Excel

References

  • How to get relative row numbers in a range in Excel
  • Offset in Excel
  • How to get last row in text data in Excel
  • How to use Excel ROWS Function
  • How to retrieve first match between two ranges in Excel

Data Validations

  • Excel Data validation allow weekday only
  • Excel Data validation exists in list
  • Excel Data validation must begin with
  • Excel Data validation don’t exceed total
  • Prevent invalid data entering in specific cells

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.

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.

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

Next Post:

Create One-dimensional and Two-dimensional Array

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

  • OR function Examples in Excel
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel NOT Function
  • How to use IFS function in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get last working day in month in Excel
  • List holidays between two dates in Excel
  • Get month from date in Excel
  • Get fiscal year from date in Excel
  • Sum through n months in Excel

Grouping

  • How to randomly assign data to groups in Excel
  • Map text to numbers in Excel
  • Group numbers with VLOOKUP in Excel
  • Group numbers at uneven intervals in Excel
  • Group arbitrary text values in Excel

General

  • Excel Autofill Cell Ranges, Copy, Paste
  • List worksheet index numbers in Excel
  • Common Errors in Excel
  • Count cells that contain errors in Excel
  • How to set or clear a print area in Excel Worksheet
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning