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,",",""))
 

Ask a Question

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.

Ask a Question

Back
Top