How do you setup a column to accept an IP address format only, i.e.,
Do you want IP address format only or do you want valid IP address format?How do you setup a column to accept an IP address format only, i.e.,
This disallows many acceptable IP addresses. Among others, it will exclude anyHi,
2. If you want a stronger data validation then:
Use the custom with a formula of the following type
Where you are applying it to the cell F1 to start. Now have the user enter
the IP address without decimal points and use the format I showed in #1.
Ron Rosenfeld said:Do you want IP address format only or do you want valid IP address format?
Valid IP addresses would have each octet in the range of 0-255.
So you would use Data/Validation Custom with the formula:
where I1 is the cell you are formatting.
Then execute copy/paste special/validation to copy the validation to the rest
of the column.
The above is not foolproof as it allows for "negative" octets. But a formula
using this approach won't work in the Data Validation box since there seems to
be a limit of 255 characters in the data validation formula box, and adding in
checks for the octets to also be >=0 would make this formula too long.
One way around that would be to put the full formula in a hidden "helper"
column, and use the data validation to check for TRUE or FALSE in that column.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.