How to remove HTML tags inside Microsoft Excel?

Mr Chan Chun Sang
Educational Development Centre

Have you seen the following strange scripts when you downloaded data from Blackboard?
 
 
The data downloaded from Blackboard could reveal meaningful results if you carried out analysis on them. However, it would be very difficult to read if the cells were like this.
 
 
What you need is the text highlighted with yellow, and rest is not necessary. To remove it, you have to delete the words one by one which is a time-consuming task. Are there any tools that can remove the text automatically and conveniently? This article provides an alternative solution that you don’t need to invest a lot of times to complete the task.
 

The cell contains lots of HTML tags, which are words wrapped with a pair of “<” (smaller than sign) and “>” (larger than sign). e.g. <span style … non;”>. Below are the steps that can remove the HTML tags easily.

 
Note: if you only need to remove a small amount of HTML tags, you can copy the words and paste them into websites like this.
 

Preparation

1.       Make sure your computer has installed Microsoft Excel.
2.       Back up the file you downloaded from Blackboard. In case the program removes the important message in the excel, you can always retrieve the data.
3.       Enable Developer Tab in Excel.
Security warning: some VBA Excel Macros contain viruses and other security hazards so that Macros are disabled by default. The Macro “vba-to-remove-html-tags.xlsm” is safe to use. Please do not run any Macros provided by unknown sources or downloaded from untrusted websites. Our team will not be responsible to any damage if you run an unknown Macro.
 
 
4.       Download the tool "vba-to-remove-html-tags.xlsm" (a tool written by VBA Excel Macros).
This tool used the procedure RemoveHTML© written by Daniel Pineault, CARDA Consultants Inc on 30th Oct, 2009. You can learn more from the website.
 
Copyright: The following may be altered and reused as you wish so long as the copyright notice is left unchanged (including Author, Website and Copyright).  It may not be sold/resold or reposted on other sites (links back to this site are allowed).
 

Method

1.       Open the tool “vba-to-remove-html-tags.xlsm” and the Excel file containing the HTML tags.
2.       When opening “vba-to-remove-html-tags.xlsm”, click the “Enable Content” button.
3.       Highlight the cells containing HTML tags in your Excel file. Please do not highlight any columns or rows.
4.       Click the Developer tab on the Ribbon and select the Macros or press the hot key Alt + F8.
5.       Select the program ‘vba-to-remove-html-tags…” and click the “Run” button.
If you have selected a lot of cells, your computer may require several minutes to perform cleaning. Please wait patiently and do not interrupt it when the tool is running. After performing the steps above, the cell will become clean and will be ready for analysis.

 

Limitation

1.       This tool may not work on the cell contains the sign “>” or “<” that you want to reserve.

 

Report a problem

Send an email to This email address is being protected from spambots. You need JavaScript enabled to view it..