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

Lookup and Reference Examples

  • How to use Excel COLUMN Function
  • Left Lookup in Excel
  • Multi-criteria lookup and transpose in Excel
  • How to get last column number in range in Excel
  • How to calculate two-way lookup VLOOKUP in Excel Table

Data Analysis Examples

  • Filter Data Based on Date in Excel
  • How to calculate average last N values in a table in Excel
  • Move chart to a separate worksheet in Excel
  • Data Series in Excel
  • Chart Axes in Excel

Data Validation Examples

  • Excel Data validation specific characters only
  • How To Create Drop-down List in Excel
  • Excel Data validation must not contain
  • Excel Data validation allow uppercase only
  • Excel Data validation number multiple 100

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 count total words in a cell 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:   How to remove trailing slash from url in Excel

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

Worked Example:   How to extract multiple lines from a cell 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 unwanted characters in Excel
  • Manipulating text strings using Left, Mid, Right, Len, Substitute in Excel
  • DOLLAR function: Description, Usage, Syntax, Examples and Explanation
  • How to check if cell contains some words but not others in Excel
  • CONCAT function: Description, Usage, Syntax, Examples and Explanation
  • Get week number from date in Excel
  • Convert Excel time to decimal hours in Excel
  • Get work hours between dates in Excel
  • Get month from date in Excel
  • Display the current date and time in Excel
  • COUPPCD function: Description, Usage, Syntax, Examples and Explanation
  • Calculate cumulative loan interest in Excel
  • NPV function: Description, Usage, Syntax, Examples and Explanation
  • PMT, RATE, NPER, PV and FV Financial Functions in Excel
  • ACCRINT function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles