Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Modify this like so to meet your alphabetic characters only criteria.
In cell C1, use this formula (array entered via Ctrl+Shift+Enter): =LEN(A1)-SUM(--((CODE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))), 1))=CODE("A"))*(CODE(MID(A1,ROW(INDIRECT("1:"&LEN (A1))), 1))<=CODE("Z"))+(CODE(MID(A1,ROW(INDIRECT("1:"&LEN (A1))), 1))=CODE("a"))*(CODE(MID(A1,ROW(INDIRECT("1:"&LEN (A1))), 1))<=CODE("z")))) This formula will return number of characters in the string that are not alphabetic. Modify the validation rule in A1 to read as follows: =B1*(C1=0) Now user will receive the error message under two conditions: 1. More than 15 characters entered 2. Any character in string that is not A-Z or a-z You will want to hide these columns, particularly the one that checks non-alpha characters, because it returns an error if the input cell is empty (#REF). On Dec 19, 9:25 am, iliace wrote: Here's an example of how this is possible. In B1, I have this formula: =LEN(A1)<=15 In A1, I have this custom validation rule: =B1 If the input is more than 15 characters, user will get an error message. However, you must have calculations on automatic for this to function. On Dec 19, 3:47 am, Anders wrote: Hi, How can i get excel to show requirement for validation? For example I want people to type in a text max 15 characters, but I want them to be able to see how many characters they can type. For example the cell can show XXXXXXXXXXXXXXX and as they start filling it in they swap the X for their own words. I know I can do validation max 15 character length but then they get a error box and need to keep taking away characters untill they get below 15. Its better if they can see it straight away, how many to fill inn. -- Regards Anders |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting a time format to a String format in Excel | Excel Discussion (Misc queries) | |||
Convert Excel 2007 format (*.xlsx) into Excel 2003 format | Excel Discussion (Misc queries) | |||
excel numbers in general format i cant add cant change format | Excel Worksheet Functions | |||
How to covert picture excel format to editable excel format | Excel Discussion (Misc queries) | |||
how to format excel format to text format with separator "|" in s. | New Users to Excel |