Reputation: 3
I can use "=AND(ISNUMBER($B2),LEN($B2)=10)", but it restricts me to input only a Single 10 digit number. My requirement is to accept either 1 or N 10 digit comma separated numbers(based on user). Ex: "1234567890,1234567890,1234567890,n..."
Let's say A person can have 2 contact numbers, I just want to restrict the cell to accept only 10 digit comma separated number.
Can it be done directly on Google Sheet? or if there is some other way to achieve it. Please help me out.
Upvotes: 0
Views: 2212
Reputation: 50573
=REGEXMATCH(TO_TEXT(A2),"^(\d{10})(,\d{10})*$")
Cell range:
A2:A
\d
igits and zero or more of ,
followed 10 \d
igits.Upvotes: 3