![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Scotland
Posts: 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.
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Leiden, The Netherlands
Posts: 68
|
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 |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 82
|
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() |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Location: Scotland
Posts: 4
|
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! |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Posts: 82
|
Glad I could give something back to the board for the info I take from it !!!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|