+ Reply to Thread
Results 1 to 8 of 8

Search filter and highlight string - non case sensitive

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Search filter and highlight string - non case sensitive

    Hi, really hope someone can help me get this one over the line, thanks in advance...

    • I have an table named TrackerTable
    • Table starts at row 4 currently around 3k rows and counting
    • Table uses columns A-AM
    • Table has headers
    • I am using cell A2 to input the string I wish to search
    • Table has numerical and text based data
    • I'm using Excel 2016 if that makes a difference to the coding

    The code below will find & filter all rows in my table that contain the search string (text or numeric) entered in cell A2 (non case sensitive). It will also highlight all instances of the search string but only where it matches the case. So my question is can anyone please help adjust the code to make the highlighting part non case sensitive?


    Also if anyone can suggest ways to make this code more efficient I would appreciate it. I'm a beginner that just searches the net and cobbles together pieces of code I can find not knowing if I'm using best practice.

    Please Login or Register  to view this content.
    Thanks & Kind Regards
    Steve

  2. #2
    Registered User
    Join Date
    10-07-2017
    Location
    Perth, Down Under
    MS-Off Ver
    2016
    Posts
    45

    Re: Search filter and highlight string - non case sensitive

    Hi Steve
    Something like this?
    Please Login or Register  to view this content.
    hth

    Ozex

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Search filter and highlight string - non case sensitive

    Quote Originally Posted by Ozex View Post
    Please Login or Register  to view this content.
    May I suggest a small change to the Do...Loop:
    Please Login or Register  to view this content.
    FINDNEXT wraps around, so rFound will never be Nothing (because original FIND worked). That's why you have to check the cell address.
    Last edited by leelnich; 11-02-2017 at 09:46 AM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  4. #4
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Search filter and highlight string - non case sensitive

    thanks, code has resolved the case issue but is only highlighting in column A regardless if the text in column A matches the search string. The idea was that it would highlight all occurrences of the searchString in each cell where it appears anywhere in the table.

    I assume its the highlighted part below but have no idea how to fix t...
    Please Login or Register  to view this content.
    Last edited by Steve@Rugby; 11-02-2017 at 06:28 PM.

  5. #5
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Search filter and highlight string - non case sensitive

    Thankyou, used your suggested update as above

  6. #6
    Registered User
    Join Date
    10-07-2017
    Location
    Perth, Down Under
    MS-Off Ver
    2016
    Posts
    45

    Re: Search filter and highlight string - non case sensitive

    Hi Steve

    Reading your comment again re showing all instances of search, this should do what you require.

    Please Login or Register  to view this content.
    Ozex
    Last edited by Ozex; 11-02-2017 at 11:35 PM.

  7. #7
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Search filter and highlight string - non case sensitive

    Awesome thanks so much, works just as I wanted. I did use none selection method as you suggested too.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Search filter and highlight string - non case sensitive

    Hey guys- Sounds like you have it, but here's an alternative version. (Some changes to both procedures.):
    Please Login or Register  to view this content.
    Last edited by leelnich; 11-03-2017 at 03:29 PM.

+ 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. Making duplicate filter case sensitive
    By JustStep25 in forum Excel General
    Replies: 4
    Last Post: 01-12-2018, 02:59 AM
  2. Performing a Case-Sensitive IF search
    By lpa06432 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-25-2017, 06:52 PM
  3. Case-sensitive filter
    By dmitriy1980 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 02-23-2016, 12:28 PM
  4. case sensitive string comparison
    By Gourav in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2014, 02:31 PM
  5. Highlight duplicate rows based on column A but be case sensitive
    By theblade24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-18-2013, 06:14 PM
  6. Case Sensitive Advance filter
    By velmuruganmp in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-11-2013, 01:47 AM
  7. [SOLVED] non-case sensitive 'string' search?
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-25-2012, 03:01 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