Data validation question

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I'd like to create data validation in a cell that prevents
user's from entering any commas, but allowing all other
characters. This spreadsheet is exported to a comma delimited
file, and extra commas cause problems. I looked at the examples
in help, and couldn't find anything preventing a character from
being entered into a cell. Any ideas?

-Thanks
 
A couple of ways:

=ISNUMBER(SEARCH(A1,","))
or
=COUNTIF(A1,"*,*")=0
or
=LEN(A1)=LEN(SUBSTITUTE(A1,",",""))
 
Back
Top