How to lookup an IP address in an Excel spreadsheet?
- by Kevin Williams
I am working with a decent sized spreadsheet of domains and server names. Another user of the spreadsheet needs the IP address for each of the DNS entries on the worksheet. Instead of manually adding and then having to maintain this list I was hoping there was an easy way to do an IPAddress lookup to display the IP address in a cell.
I've seen some VBScripts that call gethostbyname, e.g.:
Declare Function GetHostByName Lib "wsock32.dll" Alias "gethostbyname" (ByVal Host As String) As Long
But I'm not a VB expert so I'm not sure if this is the right way to go.
Any advice/links would be appreciated!
also if this is a question better suited for Stack Overflow - let me know, I'm new here.