+ Reply to Thread
Results 1 to 13 of 13

How to mix an IFNA with a IFVLOOKUP

  1. #1
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    How to mix an IFNA with a IFVLOOKUP

    Hi folks,

    I'm trying to make the below formula work and keep coming back to the same error message - You've entered to many arguments for this function.

    =IFNA(VLOOKUP(E:E,Sheet2!A:A,1,0),"No",IF(VLOOKUP(E:E,Sheet2!A:A,1,0)>=Sheet2!H2,"Correct","incorrect"))

    I'm assuming there's a logic rule that means i can't mix these three functions together in this way?

    Any assistance would be greatly appreciated.

    Many thanks,

    Weasel.

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: How to mix an IFNA with a IFVLOOKUP

    Hi Weasel

    You are asking two independent question in this formula

    The first is

    to vlookup and if the value is N/A to return "NO"

    The is one complete line and the end of the argument(s) However already in this you have a range for a single criteria

    you cannot lookup E:E as this is an entire column. Maybe you need to lookup E2?

    However you then go on to ask for another return which is where the too many arguments comes in.

    What I think you are trying to achieve would require you to write this

    =IFNA(IF(VLOOKUP(E2,Sheet2!A:A,1,0)>=Sheet2!H2,"Correct","incorrect"),"No")

    Furthermore, you may be better using match as opposed to vlookup.

    If you could upload a sample file I can certainly help with more conviction

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,650

    Re: How to mix an IFNA with a IFVLOOKUP

    Why E:E (lookup_value)? not to be a single cell? i.e E1.

    =IFERROR(IF(VLOOKUP(E1,Sheet2!A:A,1,0)>=Sheet2!H2,"Correct","incorrect"),"No")
    Quang PT

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,798

    Re: How to mix an IFNA with a IFVLOOKUP

    Not sure what you are trying to do: normally with VLOOKUP you have a single cell as first parameter e.g VLOOKUP(E2,Sheet2!A;A,0)

    The two VLOOKUP formulae are the same: do you mean this ?

    =IFERROR(IF(VLOOKUP(E2,Sheet2!A2:A1000,1,0)>=Sheet2!H2,"Correct","incorrect"),"No")

    so "No" is returned if there is an "Error" condition.


    Note also it not sensible to use whole column ranges (A:A) but restrict them to you likely maximum.

  5. #5
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    Re: How to mix an IFNA with a IFVLOOKUP

    Huge thanks to both of you for this - good to know going forward

  6. #6
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    Re: How to mix an IFNA with a IFVLOOKUP

    Ok additional question - what if i wanted to add another variable to teh formula.

    What if the cell the Vlookup starts with is blank, and i want the answer to say something else? how would i go about adding this into the formula - i've tried variations of adding an additional IF etc... but with no luck

    Any help always appreciated

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,798

    Re: How to mix an IFNA with a IFVLOOKUP

    Which cell .. A2 or E2???

  8. #8
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    Re: How to mix an IFNA with a IFVLOOKUP

    Sorry - should have specified - E2.

    Thanks

  9. #9
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: How to mix an IFNA with a IFVLOOKUP

    =IF(E2="","SAY WHAT YOU WANT HERE",IFERROR(IF(VLOOKUP(E2,Sheet2!A2:A1000,1,0)>=Sheet2!H2,"Correct","incorrect"),"No"))

    OR

    =IF(ISBLANK(E2),"SAY WHAT YOU WANT HERE",IFERROR(IF(VLOOKUP(E2,Sheet2!A2:A1000,1,0)>=Sheet2!H2,"Correct","incorrect"),"No"))

    My personal preference is the first option

  10. #10
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    Re: How to mix an IFNA with a IFVLOOKUP

    Sorry - should have specified - E2.

    Thanks

  11. #11
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    Re: How to mix an IFNA with a IFVLOOKUP

    Once again, thanks for the excellent help

  12. #12
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: How to mix an IFNA with a IFVLOOKUP

    No problem, glad I could be of some use.

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,798

    Re: How to mix an IFNA with a IFVLOOKUP

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

+ 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] Difficulty figuring out were to put IFNA
    By TheBakerBoy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-25-2016, 03:00 AM
  2. Applying IFNA to entire workbook
    By Bral1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2014, 08:49 AM
  3. IFVLOOKUP issue
    By floribunda in forum Excel General
    Replies: 4
    Last Post: 09-06-2013, 10:04 AM
  4. help with ifvlookup function.
    By jeromephoto in forum Excel General
    Replies: 2
    Last Post: 12-30-2009, 07:03 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