Results 1 to 2 of 2
  1. #1
    snax500
    Guest

    Macro Compare Case Insensitive

    In Excel2000, I have the following code in my macro:

    If rng Like rng4 Then

    the problem is that I need this comparison to be case insensitive. How do I alter this, so that "Yes" = "yes"

    Thanks

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Compare Case Insensitive

    if you want it to be case insensitive you can do something like

    if UCase(rng) like UCase(rng4) then

    The UCase function is equivalent to the UPPER function in Excel and turns all characters to uppercase.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •