After well over a decade in IT and having used Excel on and off for most of that time, I’m only now learning how powerful Excel is!



I have a spreadsheet with a lot of DNS names in, what I want is to get the IP address (do a reverse lookup), and then ping test to see if that address is up or not. Is this possible in Excel? Yes it is!

Before I present the articles that have provided the solutions, here’s an example of a very simple worksheet demonstrating the custom nslookup() and PingResult() functions. There’s also a little bit of Conditional Formatting in there to show Online as green and Offline as red.

Image: Using Excel and VBA to nslookup and Ping Test

In the example above:

On row 2) The nslookup function does an nslookup of 8.8.8.8 and ping test is successful. On row 3) The nslookup returns the IPv6 address and ping result is unsuccessful (because it’s pinging over IPv6, and PingResult searches for TTL in the output, and IPv6 ping response does not have TTL in the output.) On row…