Most IP databases include columns for "starting IP range" and "ending IP range." The values in these columns are typically eight digit integers. Your data likely has IP Addresses in a nine digit string of numbers separated by periods. For example, 1.23.456.789. To determine the location of the IP address, you will need to convert the IP address into an integer and determine within which IP range that address exists.
First, you will need to create two joins between your IP Address data and the IP Address database.(INT(
LEFT([IP Address],(FIND([IP Address], ".")))
))*16777216+
(INT(
LEFT(
MID([IP Address],
FIND([IP Address],".")+1),
FIND(MID([IP Address],FIND([IP Address],".")+1),".")-1)
))*65536+
(INT(
MID([IP Address],
FIND([IP Address], ".", FIND([IP Address], ".") +1)+1,
(FIND([IP Address], ".", FIND([IP Address], ".", FIND([IP Address],"." ) +1) +1)) - (FIND([IP Address], ".", FIND([IP Address], ".") +1))-1
)
))*256+
(INT(
RIGHT([IP Address],
LEN([IP Address]) -
FIND([IP Address], ".", FIND([IP Address], ".", FIND([IP Address],"." ) +1) +1)
)(INT(
LEFT([IP Address],(FIND([IP Address], ".")))
))*16777216+
(INT(
LEFT(
MID([IP Address],
FIND([IP Address],".")+1),
FIND(MID([IP Address],FIND([IP Address],".")+1),".")-1)
))*65536+
(INT(
MID([IP Address],
FIND([IP Address], ".", FIND([IP Address], ".") +1)+1,
(FIND([IP Address], ".", FIND([IP Address], ".", FIND([IP Address],"." ) +1) +1)) - (FIND([IP Address], ".", FIND([IP Address], ".") +1))-1
)
))*256+
(INT(
RIGHT([IP Address],
LEN([IP Address]) -
FIND([IP Address], ".", FIND([IP Address], ".", FIND([IP Address],"." ) +1) +1)
)
))001458025
60 KB
40 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.