Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Check for case of string
So as I work with this VBA from coder I see you can set case of string
Is there anyway to examine case? Either If All Uppercase or if Mixed/Init Caps is fine either way I can continue my logic. Thanks! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Check for case of string
Check your other post.
msnyc07 wrote: So as I work with this VBA from coder I see you can set case of string Is there anyway to examine case? Either If All Uppercase or if Mixed/Init Caps is fine either way I can continue my logic. Thanks! -- Dave Peterson |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Check for case of string
On Wed, 17 Feb 2010 15:08:01 -0800, msnyc07
wrote: So as I work with this VBA from coder I see you can set case of string Is there anyway to examine case? Either If All Uppercase or if Mixed/Init Caps is fine either way I can continue my logic. Thanks! First letter Cap: Dim s as String Left(s, 1) Like "[A-Z]" That might cover everything you need. If you need to be sure that if the first letter is capitalized, the rest are either ALL caps or ALL non-caps, then perhaps: Dim s as String Left(s, 1) Like "[A-Z]" And _ (Mid(s, 2) = UCase(Mid(s, 2)) Or Mid(s, 2) = LCase(Mid(s, 2))) --ron |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Check for case of string
Hi,
Try this If mystring = UCase(mystring) Then MsgBox "all uppercase" Else MsgBox "Mixed case" End If -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "msnyc07" wrote: So as I work with this VBA from coder I see you can set case of string Is there anyway to examine case? Either If All Uppercase or if Mixed/Init Caps is fine either way I can continue my logic. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check for NON-presence of a string in another string | Excel Worksheet Functions | |||
Check if variable contains a string | Excel Worksheet Functions | |||
Check for character in string | Excel Discussion (Misc queries) | |||
use of vlookup in case of multiple column check | Excel Worksheet Functions | |||
Excel VBA - Check/Format String | Excel Discussion (Misc queries) |