+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP to Search Cell with Multiple Entries and Return a Single Value

  1. #1
    Registered User
    Join Date
    05-05-2014
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    4

    VLOOKUP to Search Cell with Multiple Entries and Return a Single Value

    I want to find a value (2325541) but I have to find it in a cell that has multiple numbers, and return a number in a different cell. The VLOOKUP would look like this: =VLOOKUP(A3,'[5.5.14.csv]5.5.14'!$D$846:$E$846,2,FALSE) but since D$846 looks like the example below (having multiple PO's in one cell) I get a #N/A return. Any help/suggestions appreciated!

    "PO#2325557


    PO#2325546



    PO#2325558



    PO#2325555



    PO#2325537



    PO#2325561



    PO#2325541



    PO#2325541



    PO#2325553



    PO#2331131"

    http://www.excelforum.com/editpost.p...postid=3685183
    Last edited by TheRob; 05-06-2014 at 10:06 AM. Reason: Amending Thread Title

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,691

    Re: I think this is a VLOOKUP function but I can't get it to work.

    I didn't try to recreate your file to test it but try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The * is a wildcard character that matches any sequence of characters.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: I think this is a VLOOKUP function but I can't get it to work.

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer may be (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    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

  4. #4
    Registered User
    Join Date
    05-05-2014
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: I think this is a VLOOKUP function but I can't get it to work.

    Thank you for the reply. I couldn't get it to work. I'll try to attached sample spreadsheets soon.

  5. #5
    Registered User
    Join Date
    05-05-2014
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VLOOKUP to Search Cell with Multiple Entries and Return a Single Value

    Data2.xlsxDATA 1.xlsx

    Search Column A in spreadsheet DATA1 and return value from column B in column B on Data2 spreadsheet.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,691

    Re: VLOOKUP to Search Cell with Multiple Entries and Return a Single Value

    My formula does work, for much of your data. Your files are different than your initial description. Here is the formula for the files you attached.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However, it fails when you have more than one block of data per cell. I did a quick check and didn't see nonprinting characters in those cells except code 10 and 13, which seems to be present in the successful matches too. How do you load this data? It may require a more detailed analysis of your data than what I had time for.

    Quote Originally Posted by Microsoft Excel Help
    When searching text values in the first column of table_array, ensure that the data in the first column of table_array does not have leading spaces, trailing spaces, inconsistent use of straight ( ' or " ) and curly ( ‘ or “) quotation marks, or nonprinting characters. In these cases, VLOOKUP may give an incorrect or unexpected value. For more information on functions that you can use to clean text data, see Text and Data functions.

  7. #7
    Registered User
    Join Date
    05-05-2014
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VLOOKUP to Search Cell with Multiple Entries and Return a Single Value

    Thank you for taking a look at the spreadsheets - you hit the nail on the head with "when you have more than one block of data per cell". That's the challenge I had also...
    The data is generated from a report in a system designed by ExpressTech.

    Any additional input is appreciated.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,691

    Re: VLOOKUP to Search Cell with Multiple Entries and Return a Single Value

    I have done some more experimenting with this. VLOOKUP fails when the lookup cells exceed 255 characters. That appears to be well known within the Excel community but is not documented by Microsoft.

    I tried using a combination of INDEX and MATCH but had exactly the same problem with MATCH. I found one similar solution but it doesn't work with wildcards.

    There are also VBA solutions posted if you want to go that direction.

+ 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] need help gettting vlookup function to work
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-24-2013, 09:30 AM
  2. [SOLVED] Vlookup doesn't work - even with TRIM function
    By piper_co in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-08-2013, 08:07 AM
  3. [SOLVED] Vlookup function ceases to work...?
    By jswainson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2012, 10:46 AM
  4. [SOLVED] vlookup function does not work for 28 out of 5,232 part numbers
    By lkyleclarkel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-29-2012, 12:26 AM
  5. why doesn't vlookup function work?
    By lalaexcel in forum Excel General
    Replies: 9
    Last Post: 01-24-2006, 10:02 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