Skip navigation

HTML Decode a String in Excel, No Plugins Required

This function converts an HTML encoded string to its regular text representation without having to install third party plugins.

Public Function HtmlDecode(StringToDecode As Variant) As String
    Set oMSHTML = CreateObject("htmlfile")
    Set e = oMSHTML.createElement("T")
    e.innerHTML = StringToDecode
    HtmlDecode = e.innerText
End Function

To add it to Excel:

1. Type ALT+F11
2. In the File menu go Insert > Module
3. Paste the function from above – save it – (CTRL+S )
4. Switch back to Excel, then use it as a function in Excel like so:

Full directions for placing the function are located here:

| Updated

Don't have an Intervals account? Start your own unlimited trial.

No credit card required. No software to install. Cancel any time.

Try it Free