title: Excel VBA web scaping element challenge
body: <p>I am trying to collect pricing data from a travel website. </p>
  
  <p>Below is the HTML and I want to retrieve the number 2145.66 and put that in an Excel Cell.</p>
  
  <pre><code>&lt;ul class="hotelresults"&gt; 
  
  &lt;li class="image"&gt;&lt;img src="http://images.libertytravel.com/shared/cpl/fcl/images/upload/suppliers/H/AUA/REM/img_148208_MEDIUM.jpg" width="120" onerror="this.src='/images/book.libertytravel.com/no-pic.gif';"&gt;&lt;/li&gt;
  &lt;li class="detail"&gt;
  &lt;h4&gt;Renaissance Marina Hotel &amp;nbsp;&lt;img src="http://static0.traveltek.net/images/book.libertytravel.com/1star.png" alt="Star"&gt;&lt;img src="http://static0.traveltek.net/images/book.libertytravel.com/1star.png" alt="Star"&gt;&lt;img src="http://static0.traveltek.net/images/book.libertytravel.com/1star.png" alt="Star"&gt;&lt;img src="http://static0.traveltek.net/images/book.libertytravel.com/1star.png" alt="Star"&gt;&lt;/h4&gt;
  &lt;span class="myTime"&gt;&lt;/span&gt;&lt;span class="hotelPref"&gt;&lt;/span&gt;
  &lt;h5&gt;Aruba&lt;/h5&gt;
  &lt;span id="desc_555_0.1"&gt;Experience a fresh twist on stay and play in a stylish, sophisticated atmosphere at the Renaissance Aruba Resort and Casino. &lt;/span&gt;&lt;a href="/fusion/searchsinglehotel.pl?sessionkey=F5AFD4B1-782Cl4A8B-9B26-AC8EAE88C1E5&amp;amp;chosenhotel=555_0.1&amp;amp;chosenflight=617_0.0"&gt;See Details&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class="price"&gt;
      &lt;script language="Javascript"&gt;
  Event.observe(window, "load", function() {
  
  $$('span.roomprice').each(function(element) {
           element.innerHTML = properrounding(element.innerHTML, 2);
       });
  
  });
  &lt;/script&gt;
  
  &lt;table width="100%" cellspacing="0" cellpadding="0" border="0" class="roomsrow"&gt;
      &lt;tr class="hide"&gt;
          &lt;td colspan="3" class="sectionHeader"&gt;
              &lt;a href="#" onclick="showmore('hotelDetails'); return false"&gt;
                  &lt;div id="hotelExpand"&gt;
                      &lt;div class="plusMinus"&gt;&lt;/div&gt;
                  &lt;/div&gt; Show/Hide extra room selections
              &lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan="3" style="border:none"&gt;
  
              &lt;div id="hotelDetails" style="display:none"&gt;
  
                  &lt;table width="100%" cellpadding="0" cellspacing="0"&gt;        
                      &lt;tr class="hide"&gt;
                          &lt;th align="left"&gt;Room Description&lt;/th&gt;
                          &lt;th align="right"&gt;Total Basket Cost&lt;/th&gt;
                          &lt;th&gt;&amp;nbsp;&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                      &lt;td colspan="3"&gt;
                      &lt;script language="Javascript"&gt;
  Event.observe(window, "load", function() {
  
  $('rightprice_div_555_0.1_555:0').innerHTML = properrounding('2145.66', 2);
  </code></pre>
  
  <p>My code is as follows:</p>
  
  <pre><code>r = 0
  c = 0
  
  Set TDelements2 = .document.getelementsbyclassname("price")
  l = TDelements2.Length
  
  For i = 0 To l
  
  MsgBox (TDelements2.Item(i).innertext)
  MsgBox (i)
  i = i + 0
  
  Sheet2.Range("A1").Offset(r, c).Value = TDelements2.Item(i).innertext
  r = r + 1
  c = c + 0
  Next
  </code></pre>
  
  <p>However, this in not returning the rate/number I am looking for.</p>
  
  <p>Any help/suggestions are appreciated. </p>