troubleshooting Question

Parsing HTML tables using VB and placing data into excel

Avatar of bs329
bs329Flag for United States of America asked on
Visual Basic ClassicMicrosoft ExcelVB Script
8 Comments1 Solution1414 ViewsLast Modified:
I have the following html tabular data and would like to create a macro to parse and put the data in a row of cells:

<div class="f2"><div class="f"><table class="t1"><tr class="rs2"><th colspan="4">Earnings Per Share - Quarterly Results</th></tr><tr class="r0"><th>&nbsp;</th><th>FY (09/09)</th><th>FY (09/08)</th><th>FY (09/07)</th></tr>
<tr><td>1st Qtr</td><td align="right">$1.81</td><td align="right">$1.81</td><td align="right">$1.17</td></tr>
<tr><td>2nd Qtr</td><td align="right">$1.35</td><td align="right">$1.19</td><td align="right">$0.89</td></tr>
<tr><td>3rd Qtr</td><td align="right">$1.38</td><td align="right">$1.21</td><td align="right">$0.94</td></tr>
<tr><td>4th Qtr</td><td align="right">$1.85</td><td align="right">$1.28</td><td align="right">$1.04</td></tr>
<tr><td>Total</td><td align="right">$6.39</td><td align="right">$5.49</td><td align="right">$4.04</td></tr>

Result in Excel in this order(each number is in its own cell):
$1.17 $0.89 $0.94 $1.04 $1.81 $1.19 $1.21 $1.28 $1.81 $1.35 $1.38 $1.85

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros