+ Reply to Thread
Results 1 to 6 of 6

Lookup IP address in Subnet, return location

  1. #1
    Registered User
    Join Date
    04-12-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    3

    Lightbulb Lookup IP address in Subnet, return location

    I have 2 sheets in 1 workbook

    Sheet 1
    JOB ID IP ADDRESS Region Site
    1 172.18.04.104

    Sheet 2
    Display Name Address High Range Region Location(City)
    VLAN MS-AD Domain Contoller 172.18.04.0 172.18.04.256 USA City Name

    I'm at my wits end trying to get Region and Location from sheet 2 to sheet 1.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Lookup IP address in Subnet, return location

    Hi, welcome to the forum

    It would probably be easier to see what you are working with if you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Lookup IP address in Subnet, return location

    couldnt you just lookup the network address

    ie drop the host address (104 in this case) and make it 0 and look that up?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    04-12-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    3

    Re: Lookup IP address in Subnet, return location

    Yes it would be easier.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-12-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    3

    Re: Lookup IP address in Subnet, return location

    I got the answer i needed.

    =INDEX(Subnets!$D$2:$D$542,MATCH(1,(TRIM(LEFT(SUBSTITUTE(B675,".",REPT(" ",10)),29))=TRIM(LEFT(SUBSTITUTE(Subnets!$B$2:$B$542,".",REPT(" ",10)),29)))*(TRIM(RIGHT(SUBSTITUTE(B675,".",REPT(" ",5)),3))>=TRIM(RIGHT(SUBSTITUTE(Subnets!$B$2:$B$542,".",REPT(" ",5)),3)))*(TRIM(RIGHT(SUBSTITUTE(B675,".",REPT(" ",5)),3))<=TRIM(RIGHT(SUBSTITUTE(Subnets!$C$2:$C$542,".",REPT(" ",5)),3))),0))

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Lookup IP address in Subnet, return location

    Crossposted: http://www.mrexcel.com/forum/excel-q...-location.html Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Last edited by zbor; 04-13-2016 at 05:31 AM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Listing of IP Address from a given subnet
    By makiboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2014, 03:09 AM
  2. Find address and return GPS location from another sheet
    By shelbygt500 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2014, 04:35 AM
  3. Replies: 3
    Last Post: 12-12-2013, 11:13 AM
  4. IP address lookup - return city location
    By rtcwlomax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-17-2013, 02:15 PM
  5. Find IP address in subnet range and return text
    By jpalmer99 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-22-2013, 04:32 PM
  6. [SOLVED] Determine Subnet From IP Address
    By darrenpoyner in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-14-2012, 09:11 PM
  7. Calculate IP Address from Subnet Bit
    By talkinggoat in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-06-2010, 03:23 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1