Vlookup and Ip Addresses
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Vlookup and Ip Addresses

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Scotland
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Leiden, The Netherlands
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #4
    New Member
    Join Date
    Mar 2002
    Location
    Scotland
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #5
    Board Regular
    Join Date
    Mar 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Glad I could give something back to the board for the info I take from it !!!


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com