@Kyle123 - AB33 is working with me on the code which you came up with, I really appreciate your help, thank you!
@AB33 Big thanks, loop is working like a charm:
Sub ScrambleNavySerial()
Dim Cel As Range, ms As Worksheet, dom As HTMLDocument
Set ms = Sheets("Scramble")
Const searchUrl = "http://www.scramble.nl/index.php?option=com_mildb&view=search"
For Each Cel In ms.Range("A2:A" & ms.Range("A" & Rows.Count).End(xlUp).Row).SpecialCells(2)
Set dom = New HTMLDocument
With CreateObject("winhttp.winhttprequest.5.1")
.Open "POST", searchUrl, False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.send "Itemid=60&af=usn&serial=" & Cel & "&sbm=Search&code=&searchtype=&unit=&cn="
dom.body.innerHTML = .responseText
End With
Cel.Offset(, 1) = dom.getElementsByClassName("rowBord")(0).Cells(1).innerText
Cel.Offset(, 2) = dom.getElementsByClassName("rowBord")(0).Cells(2).innerText
Cel.Offset(, 3) = dom.getElementsByClassName("rowBord")(0).Cells(3).innerText
Cel.Offset(, 3) = dom.getElementsByClassName("rowBord")(0).Cells(4).innerText
Cel.Offset(, 4) = dom.getElementsByClassName("rowBord")(0).Cells(5).innerText
Next
End Sub
Bookmarks