+ Reply to Thread
Results 1 to 10 of 10

Lookup returning #NA when pulling from data validation drop down list?

  1. #1
    Registered User
    Join Date
    01-03-2015
    Location
    London, England
    MS-Off Ver
    MAC
    Posts
    2

    Lookup returning #NA when pulling from data validation drop down list?

    Hey guys,

    Excel rookie here...Thanks ahead of time for any help, all is appreciated!

    Essentially I am making a food cost calculator, I have a separate sheet with each food item in one column and food cost in another column. As well the food cost column data range is named.

    On the main sheet I have used data validation in a table to allow drop down of food items, in another column I have V Lookup set to retrieve the cost of the item; however, it is returning #NA!

    The table starts on A17, and the Lookup formula is "=VLOOKUP(A17,ProductsPrice,2,0)"

    I am stumped here and would appreciate any and all help.

    Regards
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Lookup returning #NA when pulling from data validation drop down list?

    would this work for you? =IFERROR(VLOOKUP(A17,ProductsPrice,2,0),0)

    EDIT: your issues isn't that is it? is it that you can't figure out why it isn't returning your value?
    Last edited by Sam Capricci; 01-07-2015 at 01:44 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Lookup returning #NA when pulling from data validation drop down list?

    The Lookup table needs to be defined as
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    not
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Lookup returning #NA when pulling from data validation drop down list?

    Change ProductsPrice Named range as
    =Sheet3!$A$1:$B$217 instead of =Sheet3!$B$1:$B$217
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Lookup returning #NA when pulling from data validation drop down list?

    Your named range for ProductsPrice is incorrect (if you want to stick to the current VLOOKUP formula you have). Change the range to cover column A as well. It would look like this:

    Please Login or Register  to view this content.
    Hope this helps!
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Lookup returning #NA when pulling from data validation drop down list?

    would this work for you?
    It would hide the error but it wouldn't fix the problem

  7. #7
    Registered User
    Join Date
    01-03-2015
    Location
    London, England
    MS-Off Ver
    MAC
    Posts
    2

    Re: Lookup returning #NA when pulling from data validation drop down list?

    Quote Originally Posted by mcmahobt View Post
    Your named range for ProductsPrice is incorrect (if you want to stick to the current VLOOKUP formula you have). Change the range to cover column A as well. It would look like this:

    Please Login or Register  to view this content.
    Hope this helps!
    This works, thank you all so much!
    I can't believe how quickly this was responded to.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Lookup returning #NA when pulling from data validation drop down list?

    yes, it took me rereading it three times to figure it out. then i was sure when i read your post.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Lookup returning #NA when pulling from data validation drop down list?

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Lookup returning #NA when pulling from data validation drop down list?

    Hi,

    Change your ProductsPrice range to cover column A & B. At the mpment it's just B

    Better still give it a dynamnic range name so that you can forget about changing the formulae when adding new rows.
    i.e.
    ProductsPrice
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ditto for the Products name bu change the ,2 to ,1
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Returning values from data validation drop down list, vlookup.
    By PotentialSimpleQuest in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2014, 10:20 AM
  2. Replies: 2
    Last Post: 03-03-2014, 03:31 PM
  3. [SOLVED] Formula not pulling the correct data based on a drop down list
    By pleasesmile in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2013, 10:46 AM
  4. in pulling data in a form with a drop down list
    By roseieroses in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-03-2013, 09:16 PM
  5. Data Validation Returning only distinct values from a list
    By JI in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 06:45 PM

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