Excel 2010:  Macro that does a NSLOOKUP

Posted on 2012-08-17
Medium Priority
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).

c:\>nslookup xxx.xx.xxx.xxx

1. Server: server123.abccompany.net
2. Address: xxx.xx.xxx.xx
4. Name:  usercomputername.abccompany.net  <--- (Just need it to return this value)
    Address:  xxx.xx.xxxx.xxx

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

Ryan earned 2000 total points
ID: 38305826

Author Comment

ID: 38306294
That was dead on!  Thank you!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

850 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