A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vlookup based on IP range



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2010, 06:52 AM posted to microsoft.public.excel.misc
Deen
external usenet poster
 
Posts: 28
Default vlookup based on IP range

Hi Every One,

I hope you all are doing well, I required your help to resolve my issue in
excel.

On single worksheet i have two different sheet name as 1.IP Range 2. Result.

Question:
EG:IP Range

Start IP End IP
Area

192.168.1.4 195.182.254.254 AG
10.15.33.10 10.18.56.254
EMEA
10.128.33.5 10.132.40.60 AP

Here it will Continued as well.

On Result sheet i required result like:

IP Area

192.170.30.30 AG
194.168.10.20 AG
10.131.37.20 EMEA
10.170.255.255 NA
10.129.36.8 AP

I required result on area column. Here we have more than 50000 IP's but very
difficult to find the area.

Could any one please help me on this issue. How i can resolve the issue


Thanks in advance
Deen
  #2  
Old April 15th, 2010, 01:17 PM posted to microsoft.public.excel.misc
Pete_UK
external usenet poster
 
Posts: 8,780
Default vlookup based on IP range

You will have to convert those IP addresses to actual numbers (each
dot represents a power of 256) and then sort the data by start address
to enable you to determine the ranges correctly. Then you would be
able to find the nearest (lower or equal) start address using VLOOKUP,
and then check the end address to see that it is not lower than your
sought address.

Hope this helps.

Pete


On Apr 15, 6:52*am, Deen wrote:
Hi Every One,

I hope you all are doing well, I required your help to resolve my issue in
excel.

On single worksheet i have two different sheet name as 1.IP Range 2. Result.

Question:
EG:IP Range

Start IP End IP
Area

192.168.1.4 195.182.254.254 AG
10.15.33.10 10.18.56.254
EMEA
10.128.33.5 10.132.40.60 AP

Here it will Continued as well.

On Result sheet i required result like:

IP Area

192.170.30.30 AG
194.168.10.20 AG
10.131.37.20 EMEA
10.170.255.255 NA
10.129.36.8 AP

I required result on area column. Here we have more than 50000 IP's but very
difficult to find the area.

Could any one please help me on this issue. How i can resolve the issue

Thanks in advance
Deen


  #3  
Old April 16th, 2010, 10:35 AM posted to microsoft.public.excel.misc
Deen
external usenet poster
 
Posts: 28
Default vlookup based on IP range

Hello Pete,

I have done the same as you said, But no luck.... Could you please explain

Regards,
Deen



"Pete_UK" wrote:

You will have to convert those IP addresses to actual numbers (each
dot represents a power of 256) and then sort the data by start address
to enable you to determine the ranges correctly. Then you would be
able to find the nearest (lower or equal) start address using VLOOKUP,
and then check the end address to see that it is not lower than your
sought address.

Hope this helps.

Pete


On Apr 15, 6:52 am, Deen wrote:
Hi Every One,

I hope you all are doing well, I required your help to resolve my issue in
excel.

On single worksheet i have two different sheet name as 1.IP Range 2. Result.

Question:
EG:IP Range

Start IP End IP
Area

192.168.1.4 195.182.254.254 AG
10.15.33.10 10.18.56.254
EMEA
10.128.33.5 10.132.40.60 AP

Here it will Continued as well.

On Result sheet i required result like:

IP Area

192.170.30.30 AG
194.168.10.20 AG
10.131.37.20 EMEA
10.170.255.255 NA
10.129.36.8 AP

I required result on area column. Here we have more than 50000 IP's but very
difficult to find the area.

Could any one please help me on this issue. How i can resolve the issue

Thanks in advance
Deen


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.