Comparing case-insensitive variables


I have a macro that grabs two emails as variables and compares them. Problem is, a lot of them will have capital letters in random spots in the second variable. I normally run something like:

“{email1}” == “{email2}”

Whenever there’s a random capital letter somewhere, this check fails and it runs my Else statement. I haven’t been able to find anything that makes this check case insensitive.

Is there something I can do to get around this? I can’t extract just everything past the first letter, as a lot of the times I’m getting emails from something like


if | storedVars[‘email1’].toUpperCase() == storedVars[‘email2’].toUpperCase()