caption sensitivity

  • Thread starter Thread starter solo_razor
  • Start date Start date
S

solo_razor

hello,

I've got an interesting problem. I am searching for a string in a
macro. e.g. animal
but the variable is set as Animal. How can i make sure case sensitivety
is not an issue for a variable.

Regards,
Niek
 
One way is to use the UCASE function to convert your
searched string to upper case. For example

For x = 1 to 10

If Ucase(cells(x,1).value) = "ANIMAL" Then
... do something exciting ...
End if

Next X

Cheers, Pete
 
Or put Option Compare Text at top of module above any procedures.

Gord Dibben XL2002
 
Back
Top