View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Ollie4 Ollie4 is offline
external usenet poster
 
Posts: 14
Default Compare last octet of IP address

Oeps, and if you use a dot as decimal seperator the formula is

=RIGHT(A2,FIND(".",A2,FIND(".",A2,FIND(".",A2,1))) )




On 5 feb, 23:03, Ollie4 wrote:
first you have to trim the ip-adres from the right to the first dot
(reading form right to left) so




10.10.15.35 becomes .35 and 192.158.96.135 becomes .135

to do this you use the unique caracter of the ip address: it has 3
dots!

to trim an ip in cel A2 use
=RIGHT(A2;FIND(".";A2;FIND(".";A2;FIND(".";A2;1))) )
te formula trims from the right starting at the position of the 3th
dot

do the same for all other ips and compare the last octets

Hope it helps
Ollie4