i am using "InStr(1, ActiveCell.Text, search)" code. how do i make the code so it is not case sensitive.
example
ActiveCell.Text = "The Malt Shoppe"
search = "malt"
i am using "InStr(1, ActiveCell.Text, search)" code. how do i make the code so it is not case sensitive.
example
ActiveCell.Text = "The Malt Shoppe"
search = "malt"
Make your string lower case using LCase, and the search should also be in lcase
InStr(1, LCase(ActiveCell.Text), LCase(Search))
- Mangesh
ty very much, it worked perfectly
Hello Hemants,
Here is a more direct way without coverting to lower case.
InStr(1, ActiveCell.Text, search,vbTextCompare)
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks