+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP with CHOOSE - returning #N/A but works using F9 calculation in formula bar

  1. #1
    Registered User
    Join Date
    10-25-2019
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    4

    VLOOKUP with CHOOSE - returning #N/A but works using F9 calculation in formula bar

    I'm trying to automate a process for populating a spreadsheet (aren't we all?)

    To explain the problem, let's equate it to marking exam papers. In this case each paper is marked by 2 assessors. We need to record both scores given, and who gave that score. Other data and comments are needed for other purposes, so I've created an online form which generates an excel download of all submitted scores, feedback, etc. - replacing a previous system where this was all done in a word doc and some poor admin had a full time job copying and pasting!

    So, I need to get just the scores from the download into the correct columns of a master spreadsheet.

    The master spreadsheet has rows with a unique reference for each paper, and columns with names of assessors (as well as a lot of other data that doesn't come into this).
    The download has a row for each feedback entry; each row includes both the paper reference and the assessor name. I set up the online form with the names as a drop down so I can be sure of an exact match.

    I've cooked up this formula using VLOOKUP and CHOOSE so that I can essentially generate a unique reference for lookup that is the paper and assessor - as each paper is marked by at least 2 assessors:

    =VLOOKUP($J243&R$1,CHOOSE({1,2},'Sheet2'!$A:$A&'Sheet2'!$B:$B,'Sheet2'!$J:$J),2,0)

    I repeatedly get an #N/A result BUT - and here's where it's odd - if I calculate with F9 while I'm in the formula bar it calculates it correctly, every time!
    Any ideas why that might be?????

    I've used a CONCATENATE on the same cell pairings to check that they register as a match, and they do (and with the F9 calculation producing a correct result, that would also confirm this is the case).

    I should probably be using an INDEX-MATCH instead but I must admit I'm rusty there and I can't get it to work, when one parameter is in the vertical and one in the horizontal. Any advice on that would be useful also!

    Thanks
    Last edited by ex-wiz; 10-25-2019 at 01:27 PM.

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

    Re: VLOOKUP with CHOOSE (I'll take advice on INDEX MATCH also!)

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-25-2019
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: VLOOKUP with CHOOSE (I'll take advice on INDEX MATCH also!)

    Apologies, hope that is now sufficient!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,731

    Re: VLOOKUP with CHOOSE - returning #N/A but works using F9 calculation in formula bar

    That's a bit better.

    Will you please attach a small sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    Instructions (Please Read Carefully):

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment (it hasn't worked for years, and despite our repeatedly asking the technical team who own the forum to fix it, they can't be bothered to do so), so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  5. #5
    Registered User
    Join Date
    10-25-2019
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: VLOOKUP with CHOOSE - returning #N/A but works using F9 calculation in formula bar

    Ok, example now attached (sorry this is my first time posting!)

    A1:D4 is the master sheet with formula.

    A8:E14 is the download data I'm referencing.

    I5:L8 shows what happens when I use F9 calculation in formula bar and these results are correct!
    Attached Files Attached Files

  6. #6
    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: VLOOKUP with CHOOSE - returning #N/A but works using F9 calculation in formula bar

    you could try this... =LOOKUP(2,1/($A$9:$A$14=$A2)/($B$9:$B$14=B$1),$E$9:$E$14)

    edit: throw an IF error on it if you want to avoid #N/A like this... =IFERROR(LOOKUP(2,1/($A$9:$A$14=$A2)/($B$9:$B$14=B$1),$E$9:$E$14),"")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  7. #7
    Registered User
    Join Date
    10-25-2019
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: VLOOKUP with CHOOSE - returning #N/A but works using F9 calculation in formula bar

    PERFECT! Thank you

    Although I still can't understand why mine worked under manual F9 calculation but not automatically just one of those things I guess!
    Last edited by ex-wiz; 10-28-2019 at 06:21 AM.

+ 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. Replies: 1
    Last Post: 03-16-2019, 06:03 PM
  2. VLOOKUP, INDEX, MATCH... What to choose
    By Piloulondon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  3. VLOOKUP, INDEX, MATCH... What to choose
    By Piloulondon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. VLOOKUP, INDEX, MATCH... What to choose
    By Piloulondon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  5. VLOOKUP, INDEX, MATCH... What to choose
    By Piloulondon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. VLOOKUP, INDEX, MATCH... What to choose
    By Piloulondon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. VLOOKUP, INDEX, MATCH... What to choose
    By Piloulondon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Tags for this Thread

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