Thanks. Would the 3rd party tool fill in the spreadsheet? I've got ~700 hostnames to look up. Really looking for something to do it programmatically.
Main Topics
Browse All TopicsI've got an excel spreadsheet with a list of IP addresses from within our network. I need to be able to determine the hostnames and fill in the neighboring column with them. I've used VB for simple utilities, but am unfamiliar with these functions.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Actually, it's a diverse list. Contiguous range on the spreadsheet, but not all in the same subnet - not sequential addresses. We've got over 700 remote subnets. I need to ping an address in each of the subnets (listed on a spreadsheet) and return the hostnames associated with the addresses. Then using the populated hostnames, parse out a piece (I know how to do this part) to be used to configure something else.
Can do this from VBA if needed but assuming this is a one off type job related to your other Q, have the column of IP's as a text file iplist.txt then run this from a command prompt:
(for /f %p in (iplist.txt) do @for /f "tokens=2 delims=:" %a in ('@nslookup %p x.x.x.x^>NUL ^| find "Name:"') do @echo %p,%a)>output.csv
where x.x.x.x is the dns server you want to point it at to resolve the names.
Steve
Business Accounts
Answer for Membership
by: sameh_salemPosted on 2009-11-03 at 03:02:47ID: 25727681
if you have DHCP server in your network you get the list of hostnames and their IP addresses directly
from dhcp console
else you can use third party tool like GFI LAN guard