Sub CurrencyClose()
Dim url As String, lRow As Long
Dim XMLHTTP As Object, wText As String
Dim start_time As Date
Dim end_time As Date
Dim sClose As Long
Dim eClose As Long
lRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lRow
url = "http://finance.yahoo.com/q?s=" & Cells(i, 1) & Cells(i, 2) & "=X"
Set XMLHTTP = CreateObject("MSXML2.serverXMLHTTP")
XMLHTTP.Open "GET", url, False
XMLHTTP.send
wText = XMLHTTP.responseText
sClose = InStr(wText, "Prev Close:")
eClose = InStr(sClose, wText, "</td>", vbTextCompare)
Cells(i, 3).Value = Mid(wText, sClose + 44, eClose - sClose - 44)
Next
End Sub