' PING-IP-to-Excel ' IP to Hostname --- or --- Hostname to IP ' ' Inspired by: Torgeir Bakken (MVP) ' http://groups.google.com/group/microsoft.public.scripting.vbscript/msg/a465907f8dc6e265?pli=1 ' ' ' HOSTNAME IP RESULT LATENCY ' -------- -- ------ ------- ' ' Using only PING at the command prompt ' ' Version 7.0 Jan/16/2011 ' Dim strHostname, strIP, strPingResult, IntLatency intRow = 2 Set objExcel = CreateObject("Excel.Application") With objExcel .Visible = True .Workbooks.Add .Cells(1, 1).Value = "XXXXXXXXXXXXXXXXXXXXXXXXXXX" .Cells(1, 2).Value = "XXXXXXXXXXXXXX" .Cells(1, 3).Value = "XXXXXXX" .Cells(1, 4).Value = "XXXXXXX" .Range("A1:D1").Select .Cells.EntireColumn.AutoFit .Cells(1, 1).Value = "Hostname" .Cells(1, 2).Value = "IP" .Cells(1, 3).Value