View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Not allowing special characters in a cell

To use data validation for this, make sure the cell you want is the active
cell. Select
Data Validation. On the Settings tab, select Custom from the Allow
combobox. Then, in the Formula box, you can enter something like:

<"/" And < "\" And < "*" And < "@" And < "&"

If the user types any of the specified characters in the cell, an error
message (which you can customize) will be displayed when he/she presses Enter.

Hope this helps,

Hutch

"TinaF" wrote:

I want to do either "conditional formatting" or "data validation", I
think, so that users will not be able to enter special characters in a
particular cell (/ * \ @, etc).

There is a macro that saves the spreadsheet using the data in this
cell as part of the file name. If they use certain special characters
(such as slashes) it causes an error when they try and run the "file
save" macro.

However, I don't see how to bar the entering of specific characters
using conditional formatting or data validation. How would I do this?