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

Data Analysis

  • How to Sort by Color in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Subtotal function in Excel
  • How to create dynamic reference table name in Excel
  • Data Series in Excel

References

  • How to use Excel LOOKUP Function
  • How to get last row in numeric data in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Extract all partial matches in Excel
  • Offset in Excel

Data Validations

  • Excel Data validation unique values only
  • Excel Data validation must contain specific text
  • Data validation must not exist in list
  • Excel Data validation allow uppercase only
  • Excel Data validation only dates between

How to strip html from text or numbers in Excel

by

To strip html or other markup from values in cells, you can use the MID function.

Formula

=MID(text,start,LEN(text)-markup_len)

Explanation

In the example shown, the formula in C5 is:

=MID(B5,4,LEN(B5)-7)

How this formula works

The MID function returns characters using a fixed starting point and ending point. In this case, the markup consists of the html bold tag, which appears at the start of each cell and the associated closing tag, which appears at the end.

The MID function has been configured to always start at 4, which effectively strips the starting tag from the value. The second argument, num_chars, is calculated by getting the total characters in the cell with LEN, then subtracting 7. We use 7 because the starting bold tag is 3 characters and the closing tag is 4 characters = 7 characters total.

With these arguments, MID extracts just the text between the two tags and returns the result.

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

  • Nested IF function example in Excel
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel XOR Function
  • IF with boolean logic in Excel

Date Time

  • Calculate days remaining in Excel
  • Convert text date dd/mm/yy to mm/dd/yy in Excel
  • DATEDIF function: Description, Usage, Syntax, Examples and Explanation
  • DATE function: Description, Usage, Syntax, Examples and Explanation
  • How to get same date next month or previous month in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • If cell contains one of many things in Excel
  • Group times into 3 hour buckets in Excel
  • Group times into unequal buckets in Excel
  • How to randomly assign people to groups in Excel

General

  • Convert column letter to number in Excel
  • Automatically fill series of cells in Excel using AutoFill
  • How to get Excel workbook path only
  • Find, Select, Replace and Go To Special in Excel
  • Find Most Frequently Occurring Word in Excel Worksheet
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning