title: Excel Amazon Seller Web Scraper Issue
body: <p>I have been trying to get this code to work for workflow efficiency purposes, but I cannot seem to make it function correctly.</p>
  
  <p>Steps:
  1. Login to Amazon Seller</p>
  
  <ol start="2">
  <li>Use order numbers in column A and place them in searchbox to search</li>
  <li>Search for element innerText of "Estimated Delivery:" and scrape information into column B adjacent the order number</li>
  <li>Move onto the next order number and repeat process until order number column is empty.</li>
  </ol>
  
  <p>The webpage code (what I'm trying to obtain is highlighted):</p>
  
  <p><a href="https://i.stack.imgur.com/Dab4T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dab4T.png" alt="enter image description here"></a></p>
  
  <pre><code>Option Explicit
  
  Dim HTMLDoc As HTMLDocument
  Dim MyBrowser As InternetExplorer
  
  Sub MyAmazonSellereEDD()
  
      Dim MyHTML_Element As IHTMLElement
      Dim MyURL As String
      Dim oSignInLink As HTMLLinkElement
      Dim oInputEmail As HTMLInputElement
      Dim oInputPassword As HTMLInputElement
      Dim oInputSignInButton As HTMLInputButtonElement
  
      'InputSearchOrder will be the destination for order numbers taken from the workbook
      Dim InputSearchOrder As HTMLInputElement
  
      Dim InputSearchButton As HTMLInputButtonElement
      Dim IE As InternetExplorer
      Dim AAOrder As Workbook
      Dim AAws As Worksheet
      Dim AAws2 As Worksheet
  
      Dim R As Range
      Dim x As Integer
      Dim i As Long
      Dim ar As Variant
      Dim elems As IHTMLElementCollection
      Dim TDelement As HTMLTableCell
  
      Dim ExcludWords() As Variant, a As Range, b As Long, LR As Long
  
      ExcludWords = Array("Estimated Delivery:")
  
  
      MyURL = "https://sellercentral.amazon.com/gp/homepage.html"
  
      Set IE = New InternetExplorer
  
      ' Open the browser and navigate.
      With IE
          .Silent = True
          .navigate MyURL
          .Visible = True
          Do
              DoEvents
          Loop Until .readyState = READYSTATE_COMPLETE
      End With
  
  
      ' Get the html document.
      Set HTMLDoc = IE.document
  
  
  
      With HTMLDoc
          .all.Item("username").Value = "blankityblank@blank.net"
          .all.Item("password").Value = "*********"
          .all.Item("sign-in-button").Click
      End With
  
        Do
          DoEvents
      Loop Until IE.readyState = READYSTATE_COMPLETE
  
      Application.Wait (Now + TimeValue("0:00:08"))
  
      'Set AAOrder = Application.Workbooks.Open("Z:\Automation Anywhere\5 Automated Tracking Imports\Amazon Prime\PrimeOrdersWithNoFulfillment.csv")
      'Set AAws = AAOrder.Worksheets("PrimeOrdersWithNoFulfillment")
  
  
  
  
  
      x = 2
      'Do Until Range("A" &amp; x) = ""
      If Range("B" &amp; x).Value = "" Then
  
          'If AAws.Range("B" &amp; x).Value = "" Then
          'x = x + 1
          Do Until Range("A" &amp; x) = ""
              Set InputSearchOrder = HTMLDoc.getElementById("sc-search-field")
              InputSearchOrder.Value = Range("A" &amp; x)
  
              Set InputSearchButton = HTMLDoc.getElementsByClassName("sc-search-button")(0)
              InputSearchButton.Click
                Do
                  DoEvents
              Loop Until IE.readyState = READYSTATE_COMPLETE
              Application.Wait (Now + TimeValue("0:00:05"))
  
  
              Set elems = HTMLDoc.getElementsByTagName("td")
  
  
              'ExcludWords = Array("Package Weight:", "Tracking ID:", "Ship Date:", "Carrier:", "Shipping Service:")
  
  
              i = 2
  
              For Each TDelement In elems
                  If TDelement.className = "data-display-field" And InStr(TDelement.innerText, "Estimated Delivery:") Then
                      Range("B" &amp; x).Value = TDelement.innerText
                      i = i + 1
                  End If
              Next
  
  
  
  
  
  
  
              LR = Range("B" &amp; Rows.Count).End(xlUp).Row
              For i = 1 To LR
              Set a = Cells(i, "B")
              For b = 0 To UBound(ExcludWords)
                  a.Formula = Replace((a.Formula), ExcludWords(b), "")
                      Next b
              Next i
  
  
          'End If
          x = x + 1
          Loop
  
  
       'Loop
       End If
  
      Err_Clear:
          If Err &lt;&gt; 0 Then
              Err.Clear
              Resume Next
          End If
  
      MsgBox ("Process is done! :)")
  
  
      End Sub
  </code></pre>
  
  <p>My issue is that when it scrapes the data, the words "Estimated Delivery:" and the actual estimated delivery date it is supposed to scrape are separate, but still should be included in the output data in column B. What it's doing is finding and inserting only "Estimated Delivery:" and then using the code, it trims those characters as instructed. The space is still blank after that. I'm not sure what the issue is.</p>