shawthingz
New Member
- Joined
- Aug 19, 2006
- Messages
- 49
Hi Folks,
I thought I'd managed to build a "bullet-proof" Excel solution for a specific Business process, but someone's just managed to break it
Here's a description of the problem I'm now facing:
I need to restrict the set of characters that a user can enter into a set of cells (which I believe I can do using the Custom Validation feature). The field length is variable.
The reason for this is that the final part of the process involves an upload to a DB so there are a limited set of characters I want to support, which are:
[a-z],[A-Z],[0-9],"-","_"
(Note that this may change in the future, so any solution needs to be easy to update)
If it helps, I've already found the following suggestion, but unfortunately it doesn't appear to work (& my feeble brain can't work out why)
>> Assume the input cell is A1, try this
>> =IF(A1="","",IF( ISERROR( SUMPRODUCT( SEARCH(MID( A1,ROW( INDIRECT( "1:"&LEN(A1))), 1), "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_" ))),"ERROR",A1))
Any cell validation formula I plug-in would need to work with Excel 2003, 2007 & 2010
Any guidance on how to solve this problem would be much appreciated!
I thought I'd managed to build a "bullet-proof" Excel solution for a specific Business process, but someone's just managed to break it
Here's a description of the problem I'm now facing:
I need to restrict the set of characters that a user can enter into a set of cells (which I believe I can do using the Custom Validation feature). The field length is variable.
The reason for this is that the final part of the process involves an upload to a DB so there are a limited set of characters I want to support, which are:
[a-z],[A-Z],[0-9],"-","_"
(Note that this may change in the future, so any solution needs to be easy to update)
If it helps, I've already found the following suggestion, but unfortunately it doesn't appear to work (& my feeble brain can't work out why)
>> Assume the input cell is A1, try this
>> =IF(A1="","",IF( ISERROR( SUMPRODUCT( SEARCH(MID( A1,ROW( INDIRECT( "1:"&LEN(A1))), 1), "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_" ))),"ERROR",A1))
Any cell validation formula I plug-in would need to work with Excel 2003, 2007 & 2010
Any guidance on how to solve this problem would be much appreciated!