Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is it possible to check the case of a letter. All the functions i found in
help seem to be able to convert text to a particular case but not check the case |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim myString as string
myString = "a" if ucase(mySting) = mystring then msgbox "UpperCase" else msgbox "LowerCase" endif -- HTH... Jim Thomlinson "phil" wrote: is it possible to check the case of a letter. All the functions i found in help seem to be able to convert text to a particular case but not check the case |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use =exact()
=exact(a1,upper(a1)) maybe???? phil wrote: is it possible to check the case of a letter. All the functions i found in help seem to be able to convert text to a particular case but not check the case -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And VBA also has a StrComp function.
You could use that to test for exact matches, too. phil wrote: is it possible to check the case of a letter. All the functions i found in help seem to be able to convert text to a particular case but not check the case -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
here's a less elegant way than the others, but just as an example
Sub test() Debug.Print Asc(Range("A1").Value) If Asc(Range("A1").Value) <= 90 And Asc(Range("A1").Value) = 65 Then Range("B1").Value = "UPPER CASE" End If If Asc(Range("A1").Value) = 97 And Asc(Range("A1").Value) <= 122 Then Range("B1").Value = "lower case" End If End Sub -- Gary "phil" wrote in message ... is it possible to check the case of a letter. All the functions i found in help seem to be able to convert text to a particular case but not check the case |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() phil Wrote: is it possible to check the case of a letter. All the functions i found in help seem to be able to convert text to a particular case but not check the case Hi Phil, To add to the other info here; If data to be checked is in A6 '=IF(EXACT(A6,UPPER(A6)),"Upper Case",IF(EXACT(A6,LOWER(A6)),"Lower Case","Upper and Lower Case")) -- Desert Piranha ------------------------------------------------------------------------ Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934 View this thread: http://www.excelforum.com/showthread...hreadid=515572 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change data of entire column from small case to upper case | Excel Worksheet Functions | |||
How do I change from upper case to proper case in excel 2002 | Excel Discussion (Misc queries) | |||
Changing multiple cell text from lower case to upper case | 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 |