I need a specific cell to accept only combination of :
Text
Numbers
the symbol "-"
The symbol "_".
If the text contains any other symbol or character, excel should reject the text.
how could I do this?
Thanks a million.
I need a specific cell to accept only combination of :
Text
Numbers
the symbol "-"
The symbol "_".
If the text contains any other symbol or character, excel should reject the text.
how could I do this?
Thanks a million.
Last edited by Paul; 05-04-2011 at 12:06 PM. Reason: Marking as solved per user request.
Can you give a number of examples?
oldchippy
-------------
Blessed are those who can give without remembering and take without forgetting
If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
The following are correct:
Tom_03
Bio-Technology
12_12_2007
The following should be rejected:
Tom#03 (# not allowd)
Tom.03 (. not allowd)
Bio Technology (spaces are not allowd)
12/12/2007 (/ is not allowd)
In conclusion, any combination of character as long as there are only numbres, text or the symbols "_" and "-"
Thanks
Does this link help?
http://exceltips.vitalnews.com/Pages..._a_Format.html
Hi Wizz and OldChippy,
I don't think that link will help since there is no length restriction, nor do any characters have to be specific to a certain position. Data Validation doesn't seem to be strong enough to handle the myriad of random combinations of letters/numbers/-/_ either.
I would suggest using a macro such as the one below, attached the the Sheet in question. It is a worksheet_Change event that will only be triggered when cell A1 is changed. Adjust Range("A1") to your specific cell as mentioned in the original post.
Please Login or Register to view this content.
Hi Paul,
That seems to do the job - must get into this VBA stuff!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks