+ Reply to Thread
Results 1 to 3 of 3

Matching string in an array of strings

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    58

    Matching string in an array of strings

    I am looking to find a matching word on an array of string. At first I was thinking of using array function filter to do the job but soon realized that it is case-sensitive operation and it does not suit my needs.

    now I am thinking of two ways to achieve what I want to do

    (a) use an old fashioned looping operation where I first lowercase cast the string and do an instr to determine if there is a match
    (b)assign the array on a worksheet to form a range then use range.find & range.findnext to get all occurrence of the looked-for pattern

    Which way would probably come out faster & are there any other way that would be more efficient than working with a looping operation?

    It would be ideal to have case-insensitive filter function but unfortunately that does not exist at all
    Last edited by vientito; 08-28-2013 at 09:04 PM.

  2. #2
    Forum Guru
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: which way would be more efficient?

    hi vientino, a couple of thoughts on the issue:
    1. Filter function: match = word and match=Word if this way is suitable
    2. Use regular expressions pattern with ignorecase property set to true
    3. Use range find method that have Matchcase option
    4. Use autofiler on a worksheet (ignores cases)

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,238

    Re: which way would be more efficient?

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Wondering if theres a more efficient way besides For Each to...
    By trickyricky in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-28-2012, 12:39 PM
  2. WorksheetFunction efficient?
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-05-2011, 04:39 PM
  3. need more efficient formula
    By tania_del in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-09-2010, 01:06 PM
  4. more efficient VBA?
    By markx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2006, 12:45 PM
  5. [SOLVED] Is there a more efficient way to do this?
    By Steve Roberts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2005, 01: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