+ Reply to Thread
Results 1 to 8 of 8

Is there a formula that will search for nonspecific values and return a match?

  1. #1
    Registered User
    Join Date
    12-21-2014
    Location
    Gainesville, Georgia
    MS-Off Ver
    2010
    Posts
    7

    Is there a formula that will search for nonspecific values and return a match?

    I have a list of words that follow a specific pattern: (V for vowel) VtVsV, VbVbV, VtVdV, and other silly patterns.
    Is there a formula that will search for words that have a similar pattern. Say i have "atasa" and somewhere I have a the word "ababa" but I don't know where. What would I do to find if I had it?

    Thank you in advance.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Is there a formula that will search for nonspecific values and return a match?

    I can't think of anyway to do this without code.

    Here's a quick loop that highlights all cells yellow in the range that match the same pattern.

    To use this, simply go to Excel, hit Alt+F11, Insert->Module, and paste the code below. Be sure to change the two ranges as notated below. The first range holds the cell you want to compare, and the second range contains all the cells you want to search. Then close that window.

    You can call the macro from normal spreadsheet world with Alt+F8.

    Please Login or Register  to view this content.
    Last edited by daffodil11; 12-23-2014 at 10:19 AM. Reason: I'm terrible at consistency
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    05-10-2013
    Location
    Pomáz, Hungary
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Is there a formula that will search for nonspecific values and return a match?

    Try this formula (enter into B2, the pattern list is in D2:D9):

    =IFERROR(INDEX(D$2:D$8,MATCH(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"a","V"),"e","V"),"i","V"),"o","V"),"u","V"),D$2:D$8,0)),"")

    VsVtV.jpg

  4. #4
    Registered User
    Join Date
    12-21-2014
    Location
    Gainesville, Georgia
    MS-Off Ver
    2010
    Posts
    7

    Re: Is there a formula that will search for nonspecific values and return a match?

    I'm sorry the formula isn't working for me. I have pasted the formula into B2, copied the words down the A1:A10 column, and even the words through A1:D1.

    Can you help?

  5. #5
    Registered User
    Join Date
    12-21-2014
    Location
    Gainesville, Georgia
    MS-Off Ver
    2010
    Posts
    7

    Re: Is there a formula that will search for nonspecific values and return a match?

    I'm sorry, István Hirsch, the formula isn't working for me. I have pasted the formula into B2, copied the words down the A1:A10 column, and even the words through A1:D1.

    Can you help?

  6. #6
    Registered User
    Join Date
    05-10-2013
    Location
    Pomáz, Hungary
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Is there a formula that will search for nonspecific values and return a match?

    The argument separator in your Excel is "," or ";"? If the latter, substitute each "," in the formula with ";" and let me know if it helps.

  7. #7
    Registered User
    Join Date
    05-10-2013
    Location
    Pomáz, Hungary
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Is there a formula that will search for nonspecific values and return a match?

    The argument separator in your Excel is "," or ";"? If the latter, substitute each "," in the formula with ";" and let me know if it helps.
    P.S.: change D$8 to D$9 (at two places in the formula).

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,410

    Re: Is there a formula that will search for nonspecific values and return a match?

    I may have interpreted the question differently. This is what I came up with:
    Copy and paste into B1 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Does this do what you want?

    I edited this post. It had an error in the formula.
    Last edited by FlameRetired; 12-23-2014 at 05:28 PM. Reason: Mistake in formula

+ 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: 7
    Last Post: 08-04-2013, 03:41 PM
  2. Formula to search, match value, search again, return SUM
    By Russ Fuquay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2013, 11:01 PM
  3. [SOLVED] How to return multiple values that match a single search criteria?
    By JSallen in forum Excel General
    Replies: 4
    Last Post: 11-28-2012, 11:49 AM
  4. Match Formula to Return 1 of 3 Possible Values
    By DanBraden in forum Excel General
    Replies: 15
    Last Post: 11-12-2010, 05:26 PM
  5. Search text string for range of text values - return match
    By crugg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2010, 09:55 AM

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