Capital & Small Letters

E

ExcelPower

CAn any one give me code for identifing whether data in a cell i
capital letter or small case?

thanks in advance


with regards


Excel Powe
 
N

NickHK

ExcelPower,
Dim MyString As String

MyString = ActiveCell.Value

Select Case True
Case MyString = UCase(MyString)
MsgBox "All capitals"
Case MyString = LCase(MyString)
MsgBox "No capitals"
Case Else
MsgBox "Mixed case"
End Select

NickHK
 
K

keepITcool

=If(EXACT(a1,UPPER(a1),"UpperCase",
If(EXACT(a1,LOWER(a1),"Lowercase","MixedCase))
or more elaborate

=IF(ISBLANK(A1),"B",IF(ISNUMBER(A1),"N",IF(ISERROR(A1),"E",IF(EXACT(A1,U
PPER(A1)),"U",IF(EXACT(A1,LOWER(A1)),"L","M")))))

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


ExcelPower wrote in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top