MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How to clean HTML from text in a cell.


Posted by Garrett on November 16, 2000 1:30 PM

Hi,

I've got about 10,000 product names/rows that have corresponding "descriptions" in a separate column. Problem: the descriptions for these products have HTML randomly embedded w/in the text (bold, italics, bullets, etc). I need to clean all of the tags from the content so that the "clean" content can be loaded into a database.

I can do it by using "search, subst, and replace" but it's extremely cumbersome. My VBA skills are quite weak/nonexistent at this point.

Suggestions?
TIA


Posted by Ben O. on November 16, 2000 1:40 PM

Try selecting the Descriptions column, copying it, and then selecting Edit > Paste Special, check Values, and then hit OK. That should paste just the plain text. You may have to paste the values into a fresh column that hasn't been formatted yet.

-Ben

Posted by Garrett on November 16, 2000 2:22 PM

Thanks for the suggestion...but HTML is not a formula (it is read as a value already), so "paste values" does not change the format of my text.
-G