+ Reply to Thread
Results 1 to 16 of 16

Index/match - giving #NA but value is correct

  1. #1
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Index/match - giving #NA but value is correct

    Can someone help?!

    I have an index/match formula that refers to a simple =H2*I2 formula. It returns #N/A. If I type the answer in over the formula, the index match string is corrected...

    What am I missing?!
    Last edited by MartinGTC; 12-12-2017 at 11:57 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Index/match

    You haven't told us very much... What is the formula that you are using? Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly 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 solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. 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.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Re: Index/match

    Attached.

    Basically - D2 sums B2 and C2. A12 should show '54' (index match 1.98 in column A, and 'a' in row 4).

    I have a much larger working SS of this, and everything is fine barre 1.98. all other values in column A work. If i manually type 1.98 over the formula in D2 - the index match formula works!

    Crazy!

  4. #4
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Re: Index/match

    Mod - I had posted while you had edited


    Can you please reinstate my previous post?

  5. #5
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Re: Index/match - giving #NA but value is correct

    Attached.

    Basically - D2 sums B2 and C2. A12 should show '54' (index match 1.98 in column A, and 'a' in row 4).

    I have a much larger working SS of this, and everything is fine barre 1.98. all other values in column A work. If i manually type 1.98 over the formula in D2 - the index match formula works!

    Crazy!
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Index/match - giving #NA but value is correct

    Change D2 to:

    =ROUND(B2*C2,2)

    It's floating point arithmetic at work

    https://support.microsoft.com/en-gb/...sults-in-excel
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Re: Index/match - giving #NA but value is correct

    Noted, but for all other values in column A, this isn't needed - can you explain why?

  8. #8
    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
    79,333

    Re: Index/match

    Quote Originally Posted by MartinGTC View Post
    Mod - I had posted while you had edited


    Can you please reinstate my previous post?
    I have reinstated your post. What had you posted whilst I had edited? I don't understand this comment based on the timestamps.
    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.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Index/match - giving #NA but value is correct

    I would think you want to change the first match to a 'closest match' type by removing the 0 as the 3rd argument..

    change
    =INDEX(B5:H9,MATCH(D2,A5:A9,0),MATCH(A11,B4:H4,0))
    to
    =INDEX(B5:H9,MATCH(D2,A5:A9),MATCH(A11,B4:H4,0))

  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index/match - giving #NA but value is correct

    I believe that this is being caused by the infamous "floating point precision error".

    You can change the formula in D2 to this:

    =ROUND(B2*C2,2)

    or change the formula in A12 to this:

    =INDEX(B5:H9,MATCH(ROUND(D2,2),A5:A9,0),MATCH(A11,B4:H4,0))

    or this (depending on whether or not you are looking for an exact match):

    =INDEX(B5:H9,MATCH(D2,A5:A9,1),MATCH(A11,B4:H4,0))

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Index/match - giving #NA but value is correct

    Dunno. Especially sine I have no idea what other values are possible for h & w..

  12. #12
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Re: Index/match

    Quote Originally Posted by AliGW View Post
    I have reinstated your post. What had you posted whilst I had edited? I don't understand this comment based on the timestamps.
    You posted that I had ignored your request, but we must've been typing at the same time as I only saw your post after I had posted mine

  13. #13
    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
    79,333

    Re: Index/match - giving #NA but value is correct

    Thanks for clarifying.

  14. #14
    Registered User
    Join Date
    07-11-2011
    Location
    England
    MS-Off Ver
    Office 2019
    Posts
    58

    Re: Index/match - giving #NA but value is correct

    Quote Originally Posted by Glenn Kennedy View Post
    Change D2 to:

    =ROUND(B2*C2,2)

    It's floating point arithmetic at work

    https://support.microsoft.com/en-gb/...sults-in-excel
    awesome!! this worked

  15. #15
    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
    79,333

    Re: Index/match - giving #NA but value is correct

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

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Index/match - giving #NA but value is correct

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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] INDEX+MATCH instead of VLOOKUP+MATCH, why is INDEX a better choice and how to re-write?
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2016, 10:54 AM
  2. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  3. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  4. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  7. Replies: 3
    Last Post: 05-02-2013, 01:31 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