Lookup IP address in Subnet, return location

christy4370

New Member
Joined
Apr 12, 2016
Messages
9
I have 2 sheets in 1 workbook

Sheet 1
JOB IDIP ADDRESSRegionSite
1172.18.04.104

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

Sheet 2
Display NameAddressHigh RangeRegionLocation(City)
VLAN MS-AD Domain Contoller172.18.04.0172.18.04.256USACity Name

<colgroup><col><col span="2"><col><col></colgroup><tbody>
</tbody>

I'm at my wits end trying to get Region and Location from sheet 2 to sheet 1.
 
A simpler formula
Code:
=VLOOKUP(TRIM(LEFT(SUBSTITUTE($B2,".",REPT(" ",99),3),99))&".0",Subnets!$B$2:$D$14,COLUMNS($C:C)+1,0)
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Here is a link to the file i'm working with. My goal is to get the Region and location columns from the Subnet tab to the Region and Site columns on the Discovery tab.
https://www.dropbox.com/s/b1vx8ee6g2pxhrh/testfile.xlsx?dl=0

The formula I gave you before would no longer work as you've changed the data format; you no longer have a "high range" column.

Do you intend to infer that all trailing number subnet addresses are possible for each Subnets line? If so a Vlookup can be used and @FlameRetired's formula in post#21 looks good for that.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,418
Members
449,449
Latest member
Quiet_Nectarine_

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top