title: Take data from next HTML tag
body: <p>Using this HTML code for example:</p>
  
  <pre><code>&lt;table class="table-grid"&gt;
  &lt;tr&gt;
  &lt;th&gt;auto.model&lt;/th&gt;
    &lt;td&gt;
      &lt;pre&gt;'Toyota Avensis Wagon'&lt;/pre&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;th&gt;auto.year&lt;/th&gt;
    &lt;td&gt;
      &lt;pre&gt;2005&lt;/pre&gt;
   &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>If I take the parameter "auto.model" between <code>&lt;th&gt;&lt;/th&gt;</code> tags and want to receive "Toyota Avensis Wagon", i.e. the next expression between <code>&lt;pre&gt;&lt;/pre&gt;</code>. Ideally I'd like to have function to do it. </p>
  
  <p>Thank you @Jeeped, but code raise "Type mismatch" error and points to <code>Set el = Param.PreviousSibling</code>:
  <code>
      Sub Extract_TD_text()
      Dim URL As String
      Dim IE As InternetExplorer
      Dim HTMLdoc As HTMLDocument
      Dim Params As IHTMLElementCollection
      Dim Param As HTMLTableCell
      Dim Val As HTMLTableCell
      Dim r As Long
      Dim el As HTMLTableCell
      URL = "My URL"
      Set IE = New InternetExplorer
      With IE
          .navigate URL
          .Visible = False
          'Wait for page to load
          While .Busy Or .READYSTATE &lt;&gt; READYSTATE_COMPLETE: DoEvents: Wend
          Set HTMLdoc = .document
      End With
      Set Params = HTMLdoc.getElementsByTagName("tr")
      For Each Param In Params
      If Param.innerText Like "*auto.model*" Then
          Set el = Param.PreviousSibling
          Exit For
      End If
      Next
      If Not el Is Nothing Then Debug.Print el.innerText
      IE.Quit
      Set IE = Nothing
      End Sub</code></p>