Strip out all HTML Tags from an excel file

3

I have an excel file that has cells with text that includes HTML tags.

The data was exported from a database and the HTML tags were included.

The HTML is stored as text, but I need it gone.

Is there a quick easy way to remove it all (other than find/replace)?

Vaccano

Posted 2010-10-07T21:38:01.580

Reputation: 5 977

This could probably be done with VBA, but it would be really helpful if you could post a few rows of the text so we could see a pattern and work the solution around it. – Michael – 2010-10-07T22:09:23.650

What is the matter with find/replace? Replacing "<*>" with "" is pretty effective. – Mike Fitzpatrick – 2010-10-07T23:41:31.000

@Mike Fitzpatrick - Can you use wild cards in find replace? (If so that would work.) – Vaccano – 2010-10-08T02:47:37.497

Yes, you can use wildcards in Excel. See my answer below. – Mike Fitzpatrick – 2010-10-08T05:35:45.337

Answers

8

Try using Excel's search/replace with wildcards. You can use * to match any string (including empty string) or ? to match a single character.

So using:

Find what: <*>

Replace with: leave blank

will remove HTML tags from your cell contents.

Mike Fitzpatrick

Posted 2010-10-07T21:38:01.580

Reputation: 15 062

Didn't know you could use wildcard like this in F/R in Excel. Very useful! – Matt The Ninja – 2015-11-12T10:52:55.457

Thanks for the tip. I did not know that Find Replace could support wild cards. – Vaccano – 2010-10-08T15:04:04.593

To add to Mike's answer;Use the asterisk (*) to find any string of characters. For example, sm finds "Smith" and "Smythe". Use the question mark (?) to find any single character. For instance, gr?y finds "Gray" and "Grey". Also, If you need to find actual asterisks or question marks in your Excel worksheet, type the tilde character (~) before them. For example, to find cells that contain asterisks, you would type ~* in the Find what box. To find cells that contain question marks, use ~? as your search criteria. – Matt 'Trouble' Esse – 2019-11-08T03:12:02.573