View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mike allen[_2_] mike allen[_2_] is offline
external usenet poster
 
Posts: 85
Default detect upper and lower case letters

i need to tell if the first letter in a text string is capital or lower
case. i have figured out how to do this in the spreadsheet, but now need it
in code. i tried converting my spreadsheet formula to code, but doesn't
work:
If Application.exact(Left(Application.UPPER(Range("A1 ")), 1),
Left(Range("A1"), 1)) = True Then
Range("b1") = "upper case"
Else
Range("b1") = "lower case"
End If
any thoughts? thanks, mike allen