Excel 2010:  Macro that does a NSLOOKUP

Posted on 2012-08-17
Last Modified: 2012-08-17
Hello Experts!

   Somewhat of an unusual request for a macro here and I'm not sure if it's doable or not.  What I'd like to accomplish is to have the macro to look at the IP address in Column A, Starting with Row 2 amd automatically populate Column B, Row 2 of my spreadsheet with the NSLOOKUP computername value.  The typical NSLOOKUP return looks something like this (usually returns 4 lines)   (See example below).


1. Server:
2. Address:
4. Name:  <--- (Just need it to return this value)

Would it be possible to just pull the 4th line and populate that data into column B, starting with Row 2?
Question by:itsmevic
    LVL 13

    Accepted Solution


    Author Comment

    That was dead on!  Thank you!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now