Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Dataval question

Hi Chip. Thanks for the formula. One folluw up question - Can we
combine
the two formulas into one, so as to not allow commas OR more than one
space
in the cell?

So essentially, combine:
=(LEN(B5)-LEN(SUBSTITUTE(B5," ","")))<2 and
=IF(ISERROR(FIND(",",B5)),1,0)

Thanks!!


"Chip Pearson" wrote in message
...

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)






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on looking up data Nick H[_2_] Excel Worksheet Functions 2 June 5th 09 03:34 PM
Sorting Data in a Row Question Karto Excel Discussion (Misc queries) 5 February 9th 09 04:33 PM
Data Series Question Raman325 Charts and Charting in Excel 2 June 6th 06 06:19 PM
Data Validation Question dgraham Excel Discussion (Misc queries) 6 April 28th 06 01:03 PM
Dataval question Steph[_3_] Excel Programming 4 April 20th 05 04:41 PM


All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"