View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Dataval question

Use a validation formula like

=(LEN(B5)-LEN(SUBSTITUTE(B5," ","")))<2

Note that there is one space between the first set of quote
marks, and nothing between the second set of quote marks.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Steph" wrote in message
...
I use the below formula in datavalidation to not allow commas
in the cell.
Is there a way to add to this to also not allow more than 1
blank space in
the cell? Thank you!!

=IF(ISERROR(FIND(",",B5)),1,0)