VBA to extract part of HTML code

smide

Board Regular
Joined
Dec 20, 2015
Messages
151
Hello.


In cell A1 I'm receiving Customer names an their home town in form of huge HTML code.
I need to extract Customer names in column A (A3:A600) and their home towns in column B (B3:B600).

Part of HTML code for names is always the same:
HTML:
<div class="customName--1gBeC">J. Jones</div>
Part of code for towns is also always the same:
HTML:
<td class="search-results-table-column-town ">Sydney</td>

Basically I need to extract somehow only part between
HTML:
1gBeC">
and
HTML:
</div>
for Name and part between
HTML:
column-town ">
and
HTML:
</td>
for Town.


I'm using excel 2007.

example.

AB
1HTML code
2
3J. JonesSydney
4C. DuncanToronto
5M. WeberMünchen
6........

<tbody>
</tbody>
 
Last edited:

Forum statistics

Threads
1,077,784
Messages
5,336,327
Members
399,076
Latest member
vullistax

Some videos you may like

This Week's Hot Topics

Top