Hi
I am trying to sort IP's in the following format
10.0.0.0/8
10.0.1.0/16
10.0.0.0/16
10.0.4.0/16
10.0.4.64/27
10.0.4.0/30
I got a formula which works well when the subnet mask i.e. /xx is not appended to the IP
=RIGHT("00"&LEFT(A2,FIND(".",A2)-1),3)&"."&RIGHT("00"&MID(A2,FIND(".",A2)+1,FIND("|",SUBSTITUTE(A2,".","|",2))-FIND(".",A2)-1),3)&"."&RIGHT("00"&MID(A2,FIND("|",SUBSTITUTE(A2,".","|",2))+1,FIND("|",SUBSTITUTE(A2&".",".","|",3))-FIND("|",SUBSTITUTE(A2,".","|",2))-1),3)&"."&RIGHT("00"&RIGHT(A2,LEN(A2)-FIND("|",SUBSTITUTE(A2,".","|",LEN(A2)-LEN(SUBSTITUTE(A2,".",""))))),3)
BUT I need the subnet mask and the expected result for the above example will be
10.0.0.0/8
10.0.0.0/16
10.0.1.0/16
10.0.4.0/16
10.0.4.0/30
10.0.4.64/27
Any help is appreciated
Thanks
Bookmarks