Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
case of the data
Is it possible to check the case of a string i.e. if its in lower or upper case
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
case of the data
Phil,
Here's a code-friendly way: Option Explicit Option Private Module Public Enum vbCase vbMixedCase = 0 vbLowerCase = 1 vbUpperCase = 2 End Enum Public Function GetCase(strTest As String) As vbCase GetCase = -((LCase(strTest) = strTest) * vbLowerCase + _ (UCase(strTest) = strTest) * vbUpperCase) End Function Sub Test() MsgBox GetCase("Robin") = vbUpperCase MsgBox GetCase("Robin") = vbLowerCase MsgBox GetCase("Robin") = vbMixedCase End Sub Robin Hammond www.enhanceddatasystems.com "phil" wrote in message ... Is it possible to check the case of a string i.e. if its in lower or upper case |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change data of entire column from small case to upper case | Excel Worksheet Functions | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
How to change mixed case to upper case in Excel for all cells | Excel Discussion (Misc queries) | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
How to use formula auditing to change upper case to Title Case. | Excel Worksheet Functions |