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:  https://support.microsoft.com/en-us/office/create-custom-functions-in-excel-2f06c10b-3622-40d6-a1b2-b6748ae8231f

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