+ Reply to Thread
Results 1 to 5 of 5

Ignoring case in text search

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Ignoring case in text search

    Hi All

    I'm using

    If cell.Text Like ("*" & mytext & "*")

    to find the text ("mytext") I input in cell G3 within any worksheet of my workbook. If it finds the text it colours it red in the cell it which it finds it.

    This works fine to a point. Unfortunately , it doesn't work if the input text is in a case different to the cells it's looking in.

    For example , if I enter 'John' and there is a cell which matches this , it will find it. If I enter 'john' it won't.

    How can I amend my code to find the input text , ignoring case? I'd like to enter 'John' and find both 'John' and 'john'.

    Grateful for any advice.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Ignoring case in text search

    Hello
    You can use LCase or UCase
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Ignoring case in text search

    You may try one of the following methods...

    Please Login or Register  to view this content.
    OR

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Ignoring case in text search

    Many thanks for your help. This is working perfectly now.


  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Ignoring case in text search

    You're welcome! Glad we could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 15
    Last Post: 07-27-2017, 08:18 AM
  2. Replies: 1
    Last Post: 07-14-2016, 05:51 AM
  3. [SOLVED] Macro for Case Sensitive Text Search
    By vcs1161 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2013, 11:13 AM
  4. [SOLVED] search for text, then search for previous text, replace 1st text including number from 2nd
    By kldailey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2012, 05:23 PM
  5. Search Upper Case
    By VegasL in forum Excel General
    Replies: 8
    Last Post: 10-01-2008, 02:44 AM
  6. Replies: 2
    Last Post: 12-09-2005, 05:15 AM
  7. [SOLVED] Comparing Sheets while ignoring Case.
    By Andy Tallent in forum Excel General
    Replies: 2
    Last Post: 10-17-2005, 12:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1