+ Reply to Thread
Results 1 to 11 of 11

Unable to resolve #N/A error

  1. #1
    Registered User
    Join Date
    11-18-2004
    Location
    San Jose, CA
    MS-Off Ver
    Windows 2010 with Office Suite 2016
    Posts
    10

    Unable to resolve #N/A error

    Functions attempted: VLOOKUP, XLOOKUP, INDEX and IFS

    COL D looks up the value in the adjacent cell in COL C.
    VLOOKUP in D enters value in array PtsPCT (N8-O48).

    COL C and N8-N48 are formatted as Numbers
    COL D and O8-O48 are formatted as Percentiles

    All functions attempted resulted with a #N/A error. This is especially maddening as other VLOOKUP, XLOOKUP, INDEX and IFS functions I've used in other sheets have worked perfect today.
    Attached Files Attached Files
    Last edited by davism2; 06-07-2023 at 12:17 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Unable to resolve #N/A error

    Your issue is that the lookup field needs to be in Ascending Order and not descending order as it is now.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Unable to resolve #N/A error

    vlookup formulas expect the search range to be sorted in ascending order

    I akso adjusted your formula to this...
    =ROUNDDOWN(N9-0.05,2)

    edit: Alan, there is also a problem with the calc in the looklup table, I fixed that using rounddown
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    11-18-2004
    Location
    San Jose, CA
    MS-Off Ver
    Windows 2010 with Office Suite 2016
    Posts
    10

    Re: Unable to resolve #N/A error

    I placed the lookup field in ascending order (named AscOrder) and in column C entered =VLOOKUP(C9,AscOrder,2,FALSE) now all cells are showing #N/A.

  5. #5
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Unable to resolve #N/A error

    Your issue is a formatting issue, this happens a lot in excel when copying and pasting things around. I simply took your Eval Points and copied that into notepad, then copied it from there back into your Eval Points section and that solved it.
    I also added IFERROR to both column D and H to prevent other errors you had happening (when there was no Eval Points value in the table)

    (I forgot to use your named ranges, but you should be able to fix that)

    See attached.
    Attached Files Attached Files
    Last edited by NewYears1978; 06-07-2023 at 09:50 AM.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Unable to resolve #N/A error

    At the risk of muddying the water rather than clarifying, the main issue I see is floating point error. In your PtsPCT table, your left lookup value column is calculated by repeatedly subtracting a fraction (0.05). Repeatedly adding/subtracting a fraction is one of the long standing, classic demonstrations of floating point error (I have textbooks going back to the '70s that use this example). I'll put a link at the end to an old (1991) but still rather thorough treatment of the subject of floating point arithmetic at the end.

    You can see the error by entering something like =(C9-N22) into a convenient cell and formatting as scientific. You will get a small, non-zero number (something like 1E-15), which shows that the two values are not exactly the same. Your VLOOKUP() function is calling for an exact match, and, when Excel searches for an exact match, it is searching for something exact to the last bit. A difference in the least significant bit is enough for Excel to declare "no match" and return N/A.

    Solutions to floating point error vary. In spreadsheets, most solutions involve rounding functions like FDibbins used. Passing the data through a text editor (or other text representation) like NewYears1978 did is another strategy. Whatever strategy you choose to use, you as the programmer need to be aware of floating point errors and program your sheet to handle it.

    Are you required to use a lookup function for this? I notice that your change in awd% and change in eval points is constant. It would be real easy to reduce the lookup table to a simple algebra expression (refresh your memory from your early algebra classes on point-slope form for straight line equations: https://www.purplemath.com/modules/strtlneq2.htm ). For this specific problem, an algebraic expression like that will be much less susceptible to floating point errors. Would that be allowed?


    More than you want to know about floating point errors: https://docs.oracle.com/cd/E19957-01..._goldberg.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,062

    Re: Unable to resolve #N/A error

    Follow up on Ford's suggestion, =IF(C8=0,0,5%-0.001*(5-C8)/0.05).

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,062

    Re: Unable to resolve #N/A error

    Sorry, it should be following up on MrShorty's suggestion...

  9. #9
    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,980

    Re: Unable to resolve #N/A error

    Then edit the post!
    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.

  10. #10
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,062

    Re: Unable to resolve #N/A error

    Time lapsed too long..

  11. #11
    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,980

    Re: Unable to resolve #N/A error

    There is no time limit as far as I am aware, unless something has changed.

+ 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. Unable to resolve timeout in Power Query
    By dtrom26 in forum Excel General
    Replies: 6
    Last Post: 11-28-2019, 11:35 AM
  2. how to resolve blank error
    By Merrysa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-12-2019, 09:32 AM
  3. [SOLVED] unable to resolve error 424
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-28-2017, 04:46 PM
  4. Unable to resolve a formula with blank cells
    By JennyMedley in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2017, 09:28 PM
  5. unable to resolve a #NUM! error message
    By Bill369 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-11-2015, 07:12 PM
  6. [SOLVED] Unable to resolve #DIV/0! in sumproduct function
    By ruraljur0r in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2014, 09:57 AM
  7. Unable to resolve Runtime error 91
    By jr2007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2013, 07:37 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