+ Reply to Thread
Results 1 to 7 of 7

Vlookup, Index Match both returning #N/A value not available error

  1. #1
    Registered User
    Join Date
    09-02-2021
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    3

    Question Vlookup, Index Match both returning #N/A value not available error

    Hi guys

    I have 2 worksheets in my excel file, the All standards worksheet has a large table of items referenced as AllStandards in it and the Doable sheet has a smaller table of selected data referenced as Doable. In the Doable sheet I was trying to create a system where I can input a specific ID number in the B column and in the C column, a vlookup or index match formula would search over in the All Standards sheet and get the description relating to that ID number. I tried both the formula methods but I keep getting returned a #N/A error as you'll be able to see in the C2 and C3 cell in the Doable sheet. Could someone please help me with this? I have no idea what I'm doing wrong. Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,306

    Re: Vlookup, Index Match both returning #N/A value not available error

    Welcome to the forum.

    Your error is in referencing the whole table instead of the relevant columns (fields). Try this:

    =INDEX(AllStandards[Description],MATCH([@Number],AllStandards[Number]),0)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,435

    Re: Vlookup, Index Match both returning #N/A value not available error

    This works okay for me in C2:

    =VLOOKUP([@Number],AllStandards[[Number]:[Description]],2,0)

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    09-02-2021
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    3

    Re: Vlookup, Index Match both returning #N/A value not available error

    Hi Ali,
    Thanks for the welcome. I'm so glad I found this place. Now I can solve all my excel woes
    Thanks for the solution, it really helps. I just had a few questions about it just to get my head around using these formulas. For the Index function, the first value is an array so would it be alright to just use the whole table reference of AllStandards and change the column num to 3 or do I have to specifically stick with AllStandards[Description]? The other question in regards to the match function is fairly similar in that excel says the second value of the match function is a lookup_array so I was just wondering why my formula of using the whole AllStandards table as a reference didn't work? Is it just one of the limitations of the function that you have to stick to one column or row?

    Thanks a lot

  5. #5
    Registered User
    Join Date
    09-02-2021
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    3

    Re: Vlookup, Index Match both returning #N/A value not available error

    Hi Pete,
    Thanks a lot for the solution. This helps so much in what I'm trying to achieve. I just had a few questions about vlookup and I was hoping you could answer them. Excel says the second value of the vlookup formula is a table_array so why doesn't it work when I put in just AllStandards because to the best of my understanding that is a table and an array?

    Thanks

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,306

    Re: Vlookup, Index Match both returning #N/A value not available error

    The lookup arrays in the MATCH section can only by 1D, in other words, one column wide.

    Maybe this will make it dynamic in the way you seem to want it to be:

    =INDEX(AllStandards,MATCH([@Number],AllStandards[Number]),MATCH(Doable[[#Headers],[Description]],AllStandards[#Headers],0))

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,435

    Re: Vlookup, Index Match both returning #N/A value not available error

    With VLOOKUP the lookup values have to be in the first column of the table defined in the second parameter, so in your case that means you want to look up the Number column and not the NZQA column (which is the first column of the AllStandards table). The third parameter defines the column that you want to return the matching data from, and this is relative to the lookup column.

    Check out my formula for the actual syntax.

    Hope this helps.

    Pete

    P.S. If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Help with VLOOKUP and INDEX-MATCH not returning all unique values.
    By codemancode in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-20-2020, 02:00 PM
  2. [SOLVED] VLOOKUP /Index Match - Returning a value if conditions are met?
    By CrunchData in forum Excel General
    Replies: 13
    Last Post: 07-28-2019, 01:29 PM
  3. [SOLVED] Returning Non-Zero Vlookup/match/index
    By leomiah in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-02-2018, 09:02 AM
  4. Index match returning #value error
    By avinash87 in forum Excel General
    Replies: 6
    Last Post: 02-10-2016, 01:52 PM
  5. Index/Match or VLookup returning Multiple Results
    By Stoppeh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2014, 08:31 PM
  6. Replies: 6
    Last Post: 03-01-2014, 11:56 PM
  7. Index/Match - returning #value error
    By jBailey031285 in forum Excel General
    Replies: 7
    Last Post: 03-13-2012, 04:52 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