Are the values you want always in the HTML elements with the names tr1, tr2, tr3 etc?
Do you always want to put the values in Q5, Q6, Q7 etc?
If that's the case and you know the no of stocks you have you could use a loop.
NoStocks = 4
For I = 1 To NoStocks
Range("Q" & 4 + I).Value = dd = IE.Document.getElementById("tr" & I).Cells(6).innerText
Next I
If you don't always know the no of stocks something might be able to be done using the no of rows in the table.
Something like this perhaps, though I'm kind of taking a bit of a guess with the code to get the no of rows in the table
NoStocks = IE.Document.getElementById("tr1").table.rows.length + 1
For I = 1 To NoStocks
Range("Q" & 4 + I).Value = dd = IE.Document.getElementById("tr" & I).Cells(6).innerText
Next I
Bookmarks