Ignore Case without using Regular Expressions
Thank-you!
EM
"Dave Peterson" wrote:
You can use lcase():
if lcase(array1(0)) = lcase(array2(0)) then
or use ucase()
Or you could use
if strcomp(array1(0),array2(0),vbTextCompare) = 0 then
Or you could force every string comparison to be case-insensitive by adding a
line to the top of the module:
Option Compare Text
ExcelMonkey wrote:
Can I compare two text strings and ignore case without using Regular
Expressions? Is there a regular VBA text function I can use?
If IgnoreCase(Array1(0)) = IgnoreCase(Array2(0)) then
'Do something
End if
Thanks
EM
--
Dave Peterson
|