Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Not allowing special characters in a cell

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?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Not allowing special characters in a cell

Perhaps use a worksheet event which checks the cell when it is entered and
"reports" on any errors.

"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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 173
Default Not allowing special characters in a cell

In the macro that uses this cell for part of the filename you could strip the
special characters before using the information (or substitute acceptable
characters).
Will

"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?


  #4   Report Post  
Posted to microsoft.public.excel.misc
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?


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
Data Validation - Only Allowing certain characters Marcus Excel Worksheet Functions 1 May 28th 07 01:34 PM
MACRO PROBLEM - allowing only paste special FARAZ QURESHI Excel Discussion (Misc queries) 1 January 4th 07 10:59 AM
ALLOWING ONLY PASTE SPECIAL (URGENT) FARAZ QURESHI Excel Discussion (Misc queries) 5 January 1st 07 08:47 PM
How do I remove "special characters" from cell data? Cal Excel Discussion (Misc queries) 3 July 17th 06 07:13 PM
Allowing the Legend Box to display more characters Sam Charts and Charting in Excel 1 July 5th 05 11:53 PM


All times are GMT +1. The time now is 03:02 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"