In VBA get rid of the case sensitivity when comparing words?

后端 未结 4 1156
清酒与你
清酒与你 2020-12-08 06:58

I am working on an VBA program which would allow the user to type an address and find the location by matching elements of the address with a database.

Unfortunatel

4条回答
  •  遥遥无期
    2020-12-08 07:29

    You can convert both the values to lower case and compare.

    Here is an example:

    If LCase(Range("J6").Value) = LCase("Tawi") Then
       Range("J6").Value = "Tawi-Tawi"
    End If
    

提交回复
热议问题