Another way
Sub abc()
Dim tmp
Dim matches
With CreateObject("vbscript.regexp")
.Pattern = "<td>(.*?)<\/td>"
.Global = True
.IgnoreCase = True
For rw = 1 To Cells(Rows.CountLarge, "a").End(xlUp).Row
tmp = Cells(rw, 5).Value
If .Test(tmp) Then
For Each matches In .Execute(tmp)
Select Case True
Case Is = InStr(1, matches.submatches(0), "Longitude: ")
Cells(rw, 5).Value = Replace(matches.submatches(0), "Longitude: ", "")
Case Is = InStr(1, matches.submatches(0), "Latitude: ")
Cells(rw, 6).Value = Replace(matches.submatches(0), "Latitude: ", "")
Case Is = InStr(1, matches.submatches(0), "Altitude: ")
Cells(rw, 7).Value = Replace(matches.submatches(0), "Altitude: ", "")
Case Is = InStr(1, matches.submatches(0), "Speed: ")
Cells(rw, 8).Value = Replace(matches.submatches(0), "Speed: ", "")
End Select
Next
If IsDate(Cells(rw, 4).Value) Then
Cells(rw, 9).Value = VBA.FormatDateTime(Cells(rw, 4).Value, vbShortDate)
Cells(rw, 10).Value = VBA.FormatDateTime(Cells(rw, 4).Value, vbLongTime)
End If
End If
Next
End With
End Sub
Bookmarks