+ Reply to Thread
Results 1 to 7 of 7

Wildcard search using vlookup

  1. #1
    Registered User
    Join Date
    07-08-2011
    Location
    Oss, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Wildcard search using vlookup

    Can anyone enlighten me with the following problem.

    Task: To sort on sales item number from item + version number list
    Problem: No uniform string length (cannot apply LEFT or RIGHT)
    Cannot use vlookup : argument FALSE gives only exact match, TRUE gives the next highest value in the target list.

    Manually using (ctrlF) with sales item* wildcard works perfectly. Is there a way to incorporate this manual method into a macro to search line for line in a list and to output the results in a new worksheet?
    Last edited by hammer180; 07-08-2011 at 05:08 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Wildcard search using vlookup

    Can you post a workbook containing some sample values and the results you want to see, based on the sample data? That way we can better understand what you want to do.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-08-2011
    Location
    Oss, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Wildcard search using vlookup

    see attachment.

    Worksheet 1 is sales items
    Worksheet 2 is with version code & storage bin.

    Problem is there is no uniformity to eliminate the version codes as the sales item string length is variable
    Attached Files Attached Files

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Wildcard search using vlookup

    Unless I'm missing something...In the workbook you posted, none of the "Sales Items" sheet values exist anywhere in the "version items + Bin" sheet. Consequently, I still don't see an example of what you want to do.

  5. #5
    Registered User
    Join Date
    07-08-2011
    Location
    Oss, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Wildcard search using vlookup

    465525A sales item could have a version code like .104
    301-007/61 sales item could have a version code of -XX , or -f4-51
    468188A sales item could have a version code of .C0__25

    The goal is to identify items in with version code list based on the sales item

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Wildcard search using vlookup

    Well, I'm still not seeing an example of what you want to do that uses the sample data you posted.

    I'll take a guess that maybe this will help....
    On your "Sales Items" sheet, this regular formula returns the count of "version items + Bin" sheet cells that contain the "material" code from Col_A of the "Sales Items" sheet:
    Please Login or Register  to view this content.
    Does that help?

  7. #7
    Registered User
    Join Date
    07-08-2011
    Location
    Oss, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Wildcard search using vlookup

    With a few minor adjustments the calculations worked fine but it took forever to analyse 120,000 lines across 2 spreadsheets.
    I applied the same algorithm for a macro for Access and achieved the same result in 2 minutes.
    Thanks for the help

+ 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