Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default Excel Format

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
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
Converting a time format to a String format in Excel Bill Partridge Excel Discussion (Misc queries) 3 October 3rd 07 11:48 AM
Convert Excel 2007 format (*.xlsx) into Excel 2003 format JD Moss Excel Discussion (Misc queries) 2 September 27th 07 06:46 PM
excel numbers in general format i cant add cant change format claude Excel Worksheet Functions 2 July 7th 06 08:18 PM
How to covert picture excel format to editable excel format SANJUZ Excel Discussion (Misc queries) 1 January 8th 06 09:27 PM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM


All times are GMT +1. The time now is 11:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"