Extract HTML text from cell

nujwaan

New Member
Joined
Nov 12, 2010
Messages
26
Hi there,
I am mass updating my website using an Excel template. I am trying to extract text from all cells. An example of the text in my cell at the moment is:

<ul>
<li>Like a 11oz mug but just without a handle makes it perfect for use either as a cup or a storage pot</li>
<li>Measures 9.5cm x 8cm x 8cm</li>
<li>Pure white in colour it enhances vibrant colours</li>
<li>Comes with black inner colour. Also available with dark blue inner and red inner.</li>
<li>Tried and tested for both photo images as well as text</li>
<li>100% dishwasher proof</li>
</ul>

I am trying to extract the red text. The sentence itself is on different lines in each cell but I have made sure that every instance of this is the same in terms of being between "<li>" and "</li>" and spacing etc. Of course the dimensions for each product will be different so I need to find a way to extract this.

If I can do it without VBA that will be good as I do not know how to use that but if not then will try and use it.

All of this text is in Column F for a bout 1100 rows.

Hope that helps and hope someone can help!

Kind regards,
N
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
(a) please use XL2BB to show samples of your sheet.
(b) what version of Excel are you running?
(c) is there anything significant about the red portion that differs from the others that are surrounded by <li> and </li> ?
 
Upvote 0
Maybe...

=MID(F2,SEARCH("<li>Measures",F2)+4,SEARCH("</li>",F2,SEARCH("<li>Measures",F2))-SEARCH("<li>Measures",F2)-4)

...where F2 contains your text.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top