Search
Filters
Close

Ping( )

=Ping() IP Tools for Excel Sheet Function to Ping test connections
 

Ping test an IP address, host name or URL in Excel. Check test monitor and evaluate network performance and status

 

  

Ping( )

Sends an ICMP echo request packet to a target host or URL/URI. Returns echo reply results, response time or bangs and dots

=Ping(TargetURL, [ReturnType], [PingCount])

Arguments

TargetURL Required

May be URL, Host Name or IP Address. Any TargetURL must be resolvable by DNS or host file else the return is #ipte_DNS-NORESOLVE

ReturnType Optional - default is 0

0  TrueFalse = TRUE/FALSE

If all requested echo requests are answered with an echo reply then TRUE is returned else the return is FALSE

1  Time = average time in milliseconds

Return the average round trip time in milliseconds for the echo request – echo reply message sequence for the PingCount. Name resolution is performed before the echo request. The time for name resolutions is not included in the average. If ping count is > 1 then all echo replies must be received else the return is -1

2  BangsAndDots = bangs and dots

Returns ! for success and . for failure. The returned string length will be PingCount

99  FailureReason = error reason

Returns a text string describing the error. If there was no error then the string #ipte_NO-ERROR is returned

PingCount Optional – default is 1

Integer value 1 to 50. The number of ICMP echo (ping) packets to send

Usage Examples

=Ping(“http://www.cisco.com”)

Sends one ICMP echo request packet to the host at www.cisco.com and returns TRUE if an echo reply is received within one second. If an echo reply is not received return FALSE

=Ping(C1,1,5)

Sends five ICMP echo request packets to the host specified by cell C1. If five echo replies are received then the average round trip time is returned in milliseconds

=Ping(“192.168.10.1”,2,10)

Sends ten ICMP echo request packets to the host at IP address 192.168.10.1. If 10 echo replies are received then the string !!!!!!!!!! is returned. A non reply will be a . (dot). A possible result string !!!..!.!.! is indicative of packet loss

=Ping(“5.5.5.2”,99)

Sends one ICMP echo request packet to the host at IP address 5.5.5.2 and returns #ipte_NO-ERROR if an echo reply is received within one second. If an echo reply is not received returns “The specified operation has timed out” or other reason for error

Notes

Any argument can be a cell reference like A7 or $D$3

Arguments can be entered as “string” or number value

Default timeout for DNS resolution and ICMP echo reply is 1 second

ICMP packet contains 50 bytes

If you set PingCount to 50 and the target host is not responding the function will take 50 seconds to return

Top of Page