I am trying to add data validation for ip address in my cell. The Ip address should be from 0.0.0.0 to 256.256.256.256. To check valid Ip address i am trying to check following conditions:
1.there should be only three dots
2.length of digits should be from 4 to 12.
3.not any digit should be more than 256 or less than 0.
4.it should not take any blanks in between
I am trying through data>data validation>custom>formula>
1.=AND((LEN(C8)-LEN(SUBSTITUTE(C8,".","")))=3,ISNUMBER(SUBSTITUTE(C8,".","")+0))
2.=AND(LEN(C8)-LEN(SUBSTITUTE(C8,".",""))=3,--LEFT(C8,FIND(".",C8)-1)<224,--LEFT(C8,FIND(".",C8)-1)>0,--MID(SUBSTITUTE(C8,"."," "),6,5)<256,--MID(SUBSTITUTE(C8,"."," "),15,7)<256,--MID(SUBSTITUTE(C8,"."," "),22,10)<256)
But my all conditions are not getting satisfied from it.
Please let me know how to add data validation for IP through data validation or conditional formatting.