Question about comparing mixed case string values

  • Thread starter Thread starter TBA
  • Start date Start date
T

TBA

What is the command that tells VBA to treat uppercase and lowercase
characters as the same?

TIA.

-gk-
 
At the top of the module, use

Option Compare Text

This will cause all text comparisons to be case insensitive.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Either upshift them

UpCase(Range("A1").Value)

or downshift them

LCase(Range("A1").Value)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
As stated,
Option Compare Text

answers the question asked, but you might not need it.
Also look in VBA help at the strcomp function.
 
Back
Top