Vlookup and Ip Addresses

Joined
Mar 24, 2002
Messages
4
I am trying to use excel to pull back a hostname using its IP address, yes I know DNS should do this, but our DNS admin people are not very efficient! I have a column of IP addresses and a 2nd column of their equivalent names, when I try to use VLOOKUP to pull back the hostname using the IP address I just get the #N/A error. Is this because excel can't sort IP addresses properly? I've tried formatting the cells as text but that doesn't help. Any info greatly appreciated.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Did you remember to set the range-lookup parameter (the 4th parameter) of the VLOOKUP function to FALSE? Otherwise, the function will expect a sorted range and might give undesired results.

Marc
 
Upvote 0
Hi,

A problem I often encounter with VLOOKUP is blank spaces in the cells. Excel treats these as values and thus won't match the variables. I spent ages trying to figure out the problem ! One of the text commands can clean out the blank spaces for you....=TRIM()
 
Upvote 0
Traversd!

You just saved me a lot of grief, it was indeed spaces!

Thanks very much! my mini DNS is now working, now I resolve to get the admin guys on the DNS server to do their job properly.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top