Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get address of first cell in range in Excel
  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • How to reference named range different sheet in Excel
  • Get nth match with INDEX / MATCH in Excel
  • How to get relative column numbers in a range in Excel

Data Analysis Examples

  • How To Compare Two Lists in Excel
  • How To Load Analysis ToolPak in Excel
  • How to Create Column Chart in Excel
  • Conditional Formatting Icon Sets Examples in Excel
  • How To Filter Data in Excel

Data Validation Examples

  • Excel Data validation specific characters only
  • Excel Data validation don’t exceed total
  • Prevent invalid data entering in specific cells
  • Excel Data validation only dates between
  • Excel Data validation exists in list

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.

Worked Example:   How to get top level domain (TLD) in Excel

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.

Worked Example:   Find longest string in column in Excel

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

Worked Example:   How to extract word containing specific text in Excel

Post navigation

Previous Post:

How to strip non-numeric characters in Excel

Next Post:

How to split text with delimiter 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
  • Remove text by matching in a cell in Excel
  • How to pad text to match equal length in Excel
  • How to find nth occurrence of character in Excel
  • FIXED function: Description, Usage, Syntax, Examples and Explanation
  • How to check if cell contains number in Excel
  • How to get Weekdays, Working days between Two Dates in Excel
  • How to get Holiday Date from Year in Excel
  • Calculate total hours that fall between two times in Excel
  • HOUR function: Description, Usage, Syntax, Examples and Explanation
  • ISOWEEKNUM function: Description, Usage, Syntax, Examples and Explanation
  • MIRR function: Description, Usage, Syntax, Examples and Explanation
  • PMT function: Description, Usage, Syntax, Examples and Explanation
  • EFFECT function: Description, Usage, Syntax, Examples and Explanation
  • ODDLPRICE function: Description, Usage, Syntax, Examples and Explanation
  • AMORLINC function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles