Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
kclover
 
Posts: n/a
Default format cells not to except dashes

I am trying to format a range of cells not to except dashes (-) ie. when
entering phone numbers 123-123-1234
  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default format cells not to except dashes

Format is a display function only, it doesn't affect how entries are
parsed (I assume you mean "accept").

You can use validation. Select your range (I'll assume that A1 is the
active cell). Choose Data/Validation/Allow:Custom with the formula

=ISERR(FIND("-",A1))



In article ,
"kclover" wrote:

I am trying to format a range of cells not to except dashes (-) ie. when
entering phone numbers 123-123-1234

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default format cells not to except dashes

Try this:
Using cell A1
Set the numbe format to Special and select Phone Number

Then:
DataData Validation
Allow: Custom
Formula: =ISERROR(FIND("-",A1))

If length is an issue:
Use this validation formula instead:
=AND(LEN(A1)=10,ISERROR(FIND("-",A1)))

Does that give you something to work with?

***********
Regards,
Ron


"kclover" wrote:

I am trying to format a range of cells not to except dashes (-) ie. when
entering phone numbers 123-123-1234

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
How can I find and format specific cells automatically in Excel? Amy Excel Worksheet Functions 1 August 6th 05 03:00 PM
Number format exactly the same, displays differently in some cells eider Excel Discussion (Misc queries) 1 July 29th 05 12:26 AM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
How do I format cells and enter data to be valued for TIME and th. George Excel Worksheet Functions 1 April 11th 05 07:23 PM
How do I get brackets in format cells accounting? allan Excel Discussion (Misc queries) 2 February 12th 05 11:08 PM


All times are GMT +1. The time now is 10:19 AM.

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"