Find IP in between two ranges

Hello Community,

I have two indexes. Index 1 contains a column of IP address. Index 2 contains 2 columns: the start subnet and end IP Address column. I want to find in which subnet range does the particular IP belong to? Please help.

image
image

Can you give an example?
Also provide your index mapping and data sample.

2 Likes

++ to providing more info.
A screenshot of a spreadsheet isn't that helpful unfortunately.

1 Like

example: say ip address 10.127.9.55 from my second excel photo belongs to which range.
there are 9 ranges in my first excel sheet photo i.e start ip address to end ip address.
so the answer i expect is that this ip belongs to the 10.127.9.1(start ip) to 10.127.9.255(end ip) range

How many ranges you have?
one option is to create a scripted field and check the ranges.
With an if/else or switch/case statements.
It is not scalable, but if you need it for a low number of ranges it might work.

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.