+ Reply to Thread
Results 1 to 11 of 11

Help with lookup returning non existent values

  1. #1
    Registered User
    Join Date
    12-26-2010
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2011
    Posts
    42

    Help with lookup returning non existent values

    I am trying to produce a frequency pf pick table using a customer's product master file and a sales volume file and have got some peculiar results. Where, for example, a product code appears in the sales volume file but not in the product master file, the lookup returns the description for the next nearest product code above it. I hope that makes sense.

    So, is there a way to return, say, 'Not in pmf' instead of the erroneous description or perhaps even " " (as a blank)?

    Help greatly appreciated please.

    heFFers

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with lookup returning non existent values

    You might have ignored the last argument

    VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

    set it to 0 or false


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help with lookup returning non existent values

    Perhaps using an IFERROR in front of your formula?

    A small sample workbook will helps us to be able to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    12-26-2010
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2011
    Posts
    42

    Re: Help with lookup returning non existent values

    I was just using the lookup not Vlookup, I will try that and report back, thanks - fingers crossed.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with lookup returning non existent values

    Lookup by default returns the result of approximate match when there is no exact match is found.

  6. #6
    Registered User
    Join Date
    12-26-2010
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2011
    Posts
    42

    Re: Help with lookup returning non existent values

    I tried Vlookup again and couldn't figure out how to get this to work

    I am going to attach the sheet (its quite large) and if anyone can help I will be most appreciative - been struggling for hours with this.

    Thanks heifers
    prod code file.xlsx

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with lookup returning non existent values

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

    Drag it down...

    If you want to mask the error (i.e. Non Available Items) with a message then use Iferror as suggested by Fotis1991 in Post #3 like this...

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

    Or if you want to non available items as blank then use like this...

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

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help with lookup returning non existent values

    Perhaps..?

    =IFERROR(INDEX($W$2:$W$1621,MATCH(A2,$V$2:$V$1621,0)),"no match")

  9. #9
    Registered User
    Join Date
    12-26-2010
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2011
    Posts
    42

    Re: Help with lookup returning non existent values

    Woohoo, thanks guys, you are wonderful - don't know how to post that its solved

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with lookup returning non existent values

    Glad it helps your and thanks for the feedback.

    Please refer my signature area to know how to mark it as solved

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help with lookup returning non existent values

    .........................

+ 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