Sub Test()
For Each x In Sheets("Feuil1").Range("A2:" & Sheets("Feuil1").Range("A65536").End(xlUp).Address)
Sheets("Feuil2").Cells.Clear
Depart = x.Value
Arrivee = x.Offset(0, 1).Value
With Sheets("Feuil2").QueryTables.Add(Connection:="URL;http://maps.google.fr/maps?f=d&saddr=" & Depart & "&daddr=" & Arrivee _
& "&geocode=&hl=fr&mra=pe&mrcr=0&dirflg=d&sll", Destination:=Sheets("Feuil2").Range("A1"))
.Name = "itinéraire"
.BackgroundQuery = True
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.Refresh BackgroundQuery:=False
End With
Set result = Sheets("Feuil2").Cells.Find("Itinéraire en voiture")
If result Is Nothing Then
x.Offset(0, 2) = "Itinéraire non trouvé !"
Else
x.Offset(0, 2) = result.Offset(1, 0)
km = Split(Replace(result.Offset(1, 0), ",", "."), " km")
x.Offset(0, 3) = km(0)
temps = Split(result.Offset(1, 0), " ")
If UBound(temps) = 7 Then
x.Offset(0, 4) = temps(4) & ":" & temps(6)
ElseIf UBound(temps) = 5 Then
x.Offset(0, 4) = "0:" & temps(4)
Else
x.Offset(0, 4) = "0:0"
End If
End If
Next
End Sub