Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Testing the case of text in a cell
Can anyone suggest a simple way, using formulas, to test whether the text in a cell is all lowercase? I have found one way to do this but it's very complicated and I think there must surely be an easier way.
My first thought was to use the LOWER function (converts text to lowercase) in the formula =(LOWER(A1) = A1) . But this doesn't work, as text comparison seems to be case-insensitive so this always gives TRUE. I didn't want to create a custom function and eventually came up with the ridiculously complex array formula {=MIN(IFERROR(CODE(MID(A1, {1,2,3,4,5,6,7,8,9,10,11,12,13},1)), 500))=97} which tests each letter (assuming there are at most 13 letters, which there are in my case) using its ASCII code. (The IFERROR handles cases where there are fewer than 13 letters.) This works if the text consists only of letters. But can anyone suggest a simpler way? Howard |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Testing the case of text in a cell
"Howard Silcock" wrote:
Can anyone suggest a simple way, using formulas, to test whether the text in a cell is all lowercase? =IF(EXACT(A1,LOWER(A1)),"all lowercase","not all lowercase") |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Testing the case of text in a cell
On Thursday, April 3, 2014 10:05:24 AM UTC+11, joeu2004 wrote:
"Howard Silcock" wrote: Can anyone suggest a simple way, using formulas, to test whether the text in a cell is all lowercase? =IF(EXACT(A1,LOWER(A1)),"all lowercase","not all lowercase") Thank you very much. I thought there must be a built-in function I could use. Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
Newbie: Problem with 'Select Case' testing syntax | Excel Programming | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
Detecting Case of Text in a Cell | Excel Discussion (Misc queries) | |||
How do I change existing text from lower case to upper case | Excel Discussion (Misc queries) |