Updated PingCell Function for Excel

This post was previously released under a different blog and is being republished by me below. That site is no longer available. I am the original author.

I’ve updated my Microsoft Excel PingCell code that I published previously. The new function returns all results from Win32_PingStatus back to Excel. You can now ping and choose the results you’d like to see returned (example below code). The Win32_PingStatus class is documented on Microsoft’s Website.

To restrict the results returned to just what you want, modify the rows where Cells(r.row, column+n) are set. For example, to return just the status and the IP Address, you’d remove all except for these two:

You can then change the column+4 to column+1 so that they sit next to each other.


One Comment

  1. 10 years on the last publication, and your script is still of tremendous use. I use VBA to get my things done using my VB6 programming experience of early 2000 years and code snippets available on internet. You just made my life easier today as I have been using a combination of nslookup and ping results dumped to files and then processing these files to get the desired results. Your script does not require me to do that anymore. Many thanks again.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.