It's really time to read the TCP/IP Primer!

In it the IsInIPRange() UDF is introduced which checks whether an IP address is within a range of IP addresses as described by the Network ID and Subnet Mask.

There are also a couple of other IP-related UDFs listed that will be helpful for you. Reading the primer will save you time, even in your emergency situation!
_________________________
There are two types of vessels, submarines and targets.