title: Scrape the innertext from an "a href" in an HTML page with EXCEL VBA
body: <p>I am trying to scrape data from a website with the following HTML code</p>
  
  <pre><code>&lt;a href='https://somesite.com/nation/id=344'&gt;Vee Veetis &lt;img src='https://somesite.com/img/flags/albania.jpg' class='tinyflag'&gt;&lt;/a&gt;&lt;br /&gt;FireBird &lt;/td&gt;
  </code></pre>
  
  <p>I have the following VBA</p>
  
  <pre><code>    With IE.document
  
      Set elems = .getElementsByTagName("a")
      For Each e In elems
  
          If e Like "https://somesite.com/record/id=*" Then
              Sheets("Members").Range("A" &amp; i).Value = e
              Sheets("Members").Range("B" &amp; i).Value = e.innerText ' doesnt work, returns "view" - desire 'Vee Veetis'
              Sheets("Members").Range("C" &amp; i).Value = e.outerText ' doesnt work, returns "view" - desire 'Firebird'
              i = i + 1
              Exit For ' remove this to scrape remaning items once working
          End If
  
      Next e
  
      End With
  </code></pre>
  
  <p>I am able to scrape the actual link without problem, but I am struggling to find how I can reference the Text that contains the link "Vee Veetis" and the corresponding text 'Firebird' that is directly after the link. Does anybody have guidance on how these are related and can be efficiently scraped?</p>