+ Reply to Thread
Results 1 to 6 of 6

Matching macro ignores ALL CAPS, finds no match.

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Matching macro ignores ALL CAPS, finds no match.

    If I have the name on the list of filenames as "George, King" and the source sheet as KING GEORGE then it will fail to find and export. but if I change the source sheet to King George then it will find it just fine. I know there are not any trailing spaces or anything as I have retyped the word to make sure.

    How do I get it to ignore the case?



    Please Login or Register  to view this content.
    Last edited by taylorsm; 02-05-2018 at 01:10 PM.

  2. #2
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Matching macro ignores ALL CAPS, finds no match.

    Option Compare Text seems to have done it. Anything better?

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,101

    Re: Matching macro ignores ALL CAPS, finds no match.

    Another option is to add the final parameter to the Instr like
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Matching macro ignores ALL CAPS, finds no match.

    Is there a benefit in going that route?

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,101

    Re: Matching macro ignores ALL CAPS, finds no match.

    Possibly
    If you run Option Compare Text, then that will affect all macros in that module.
    If you only have the 1 macro then no problem, but if you have other macros in that module then it may cause problems, depending on what the other macro(s) are doing.

  6. #6
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Matching macro ignores ALL CAPS, finds no match.

    Gotcha. Thanks!

+ 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. [SOLVED] Counting the number of times INDEX/MATCH finds more than 1 match.
    By loloduane in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2014, 03:35 AM
  2. [SOLVED] sumif which finds text, not an exact match, but a close match instead
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2014, 08:29 PM
  3. Replies: 4
    Last Post: 01-15-2013, 03:56 PM
  4. Replies: 2
    Last Post: 07-11-2012, 08:58 AM
  5. [SOLVED] Loop Until it finds matching string
    By Hallet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2012, 03:02 PM
  6. Macro finds matching values but skips code after?
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-22-2011, 08:32 AM
  7. Replies: 2
    Last Post: 01-01-2011, 02:52 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