detect upper and lower case letters
If UCase(Left(Range("A1"),1)) = Left(Range("A1"),1) Then
Range("b1") = "upper case"
Else
Range("b1") = "lower case"
End If
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"mike allen" wrote in message
...
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
|