+ Reply to Thread
Results 1 to 14 of 14

Searching data that contains wildcards

  1. #1
    Registered User
    Join Date
    12-16-2006
    Posts
    7

    Searching data that contains wildcards

    HTML Code: 

    I am looking for a way to search column A for a similar value (a character in place of the "*"). For example:

    Search for MS3100W32-6S OR MS3100F32-6S in column A and have excel return MS3456W32-6P from column B.

    Search for MS3106A10SL-4S OR MS3106P10SL-4S in column A and have excel return MS3450W10SL-4P from column B.

    etc...

    The "*" in column A data is throwing me off

  2. #2
    Registered User
    Join Date
    11-30-2006
    Location
    UK
    MS-Off Ver
    Microsoft Office XP
    Posts
    61

    Worth a try

    Try putting ~ before your wildcard character

    ~*
    or
    ~?

    Jason

  3. #3
    Registered User
    Join Date
    12-16-2006
    Posts
    7
    It is critical that the search does not contain the wildcard...

    I need to search for the exact phrase "MS3106P10SL-4S" and return MS3450W10SL-4P using the given table.

  4. #4
    Registered User
    Join Date
    11-30-2006
    Location
    UK
    MS-Off Ver
    Microsoft Office XP
    Posts
    61
    You could create another column (hidden if you like) next to your look up array using:

    Please Login or Register  to view this content.
    That would take out the wild card character. You could then search using that.

    I'm sure there are better ways but that would work.

  5. #5
    Registered User
    Join Date
    12-16-2006
    Posts
    7
    If I take the wild card * out of A1 for example, I will have MS310032-6S. That's fine, but if i am searching for MS3100A32-6S, MS3100C32-6S, or MS3100B32-6S, it will not be found in column A.

    For example, I need to search for the exact phrase "MS3106P10SL-4S" and return MS3450W10SL-4P using the given table.

    Thanks for your help on this

  6. #6
    Registered User
    Join Date
    12-16-2006
    Posts
    7
    I basically need the * to represent any letter character.

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This might get the ball rolling


    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  8. #8
    Registered User
    Join Date
    11-30-2006
    Location
    UK
    MS-Off Ver
    Microsoft Office XP
    Posts
    61

    Lightbulb Possible final solution

    Quote Originally Posted by VBA Noob
    This might get the ball rolling

    VBA Noob
    Can I give it a shove?

    Wild search.zip

    I think this is what you asked for.

    Comments welcome - I'm always willing to learn something new.

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Jason,

    How's your work for the below as only searchs one condition.

    MS3106A10SL-4S OR MS3106P10SL-4S
    VBA Noob

  10. #10
    Registered User
    Join Date
    11-30-2006
    Location
    UK
    MS-Off Ver
    Microsoft Office XP
    Posts
    61
    It doesn't yours is the one to use under those conditions.

    I think I followed what you did; thanks again. I always learn something from reading your solutions.

    Original post said:

    I am looking for a way to search column A for a similar value (a character in place of the "*"). For example:

    Search for MS3100W32-6S OR MS3100F32-6S in column A and have excel return MS3456W32-6P from column B.

    Search for MS3106A10SL-4S OR MS3106P10SL-4S in column A and have excel return MS3450W10SL-4P from column B.
    It seemed not to matter what the variable character is, Column A only has asterix's, so I didn't allow for version search. Rereading now, you are right

    I will look again and re-submit.

  11. #11
    Registered User
    Join Date
    11-30-2006
    Location
    UK
    MS-Off Ver
    Microsoft Office XP
    Posts
    61
    struggling!

    You know any way to validate a cell's contents based on the results of an array formula?

  12. #12
    Registered User
    Join Date
    12-16-2006
    Posts
    7
    Thanks so much guys!!!

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You got an answer then ??

    VBA Noob

  14. #14
    Registered User
    Join Date
    11-30-2006
    Location
    UK
    MS-Off Ver
    Microsoft Office XP
    Posts
    61

    Lightbulb A long time coming lol

    I've been busy doing other things, ok? lol

    Probably buggy as a week old buffalo carcass but it's been a good learning experience.

    Free.zip

    Comments, critisism, opinions and advice welcomed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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