+ Reply to Thread
Results 1 to 13 of 13

INDEX MATCH function returns result #N/A

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    INDEX MATCH function returns result #N/A

    I am new to this forum and also new to INDEX/Match so please bear with me. I have two workbboks RW and Red. In RW the columns ISI and BUI acquire their values from another workbook I now want to calculate a value for HFI by looking up ISI and BUI in Red. Red has two sheets C3 and M2. First need a working formula. In my example I get #N/A. Is it my syntax or perhaps the wrong function?

    Second (and maybe this should be a follow up post?) how do I use the listed fuel type in RW to specify which sheet to read in Red? I am using Office2003. Below is a SnagIt image of my files.. Previewing this post I don't see my files so may need some help just running the forum..

    Red.xlsRW.xls
    Attached Images Attached Images

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

    Re: INDEX MATCH function returns result #N/A

    Try to open the source file to let the formula updated.
    Quang PT

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

    Re: INDEX MATCH function returns result #N/A

    When you write a match function like this

    =MATCH(B2,A2:A22,) <--Notice no entry after the last comma.
    This assumes the 3rd argument to be a 0
    =MATCH(B2,A2:A22,0)
    This makes the match look for an EXACT match.
    Which of coarse there is no exact match in the table.
    You're looking up 4.9 in a table of whole numbers 1,2,3,4,5,6,7,8,etc..

    Try changing that to
    =MATCH(B2,A2:A22,1)
    or
    =MATCH(B2,A2:A22) <-- Notice no comma at all, this makes it assume 1 instead of 0.

    However, this searches for the largest value that is LESS than the lookup value.
    So it's going to return 4, but it looks like you want it to return 5

    Can you sort Column A DEscending (22, 21, 20 etc..) ?
    Then use -1 as the 3rd argument
    =MATCH(B2,A2:A22,-1)


    Hope that helps.

  4. #4
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: INDEX MATCH function returns result #N/A

    Thanks. I'll try your suggestions. Also may have to ROUND the ISI value to nearest whole number?

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

    Re: INDEX MATCH function returns result #N/A

    Quote Originally Posted by morrisondan View Post
    Also may have to ROUND the ISI value to nearest whole number?
    That would work to, use Roundup or ceiling

    =MATCH(CEILING(B2,1),A2:A22,0)

  6. #6
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: INDEX MATCH function returns result #N/A

    Tried reverse order sort with type -1 as well as removed comma and still get #N/A.

  7. #7
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: INDEX MATCH function returns result #N/A

    To follow up.. Also changed the ISI value to 5.0 and still does not work. Doesn't work but do not see a formula error. Now attempting do a trace.

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

    Re: INDEX MATCH function returns result #N/A

    Can you attach an actual copy of the book, not just a picture?

    And copy the sheet from the 2nd book into the first, and just reference that for now.
    So we only need to see 1 book.

  9. #9
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: INDEX MATCH function returns result #N/A

    RW.xls

    Put the Red file into RW as sheet M2. Have deleted my original function as didn't work anyway. Perhaps should be VLOOKUP and MATCH?
    Last edited by morrisondan; 04-22-2013 at 02:46 PM. Reason: to make more clear

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

    Re: INDEX MATCH function returns result #N/A

    YOu need to apply the ceiling on BOTH match values.
    Just like column B on the Day1 sheet, column C also contains decimal values.
    But the formatting of the cell made it DISPLAY rounded to a whole number, But the real value is still there.

    In E2, put
    =INDEX('M2'!$B$2:$N$22,MATCH(CEILING(B2,1),'M2'!$A$2:$A$22,0),MATCH(CEILING(C2,1),'M2'!$B$1:$N$1,0))

  11. #11
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: INDEX MATCH function returns result #N/A

    I see a reply now from Jonmol and I'll try that next. Thanks.

  12. #12
    Registered User
    Join Date
    04-09-2013
    Location
    BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: INDEX MATCH function returns result #N/A

    Quote Originally Posted by Jonmo1 View Post
    YOu need to apply the ceiling on BOTH match values.
    Just like column B on the Day1 sheet, column C also contains decimal values.
    But the formatting of the cell made it DISPLAY rounded to a whole number, But the real value is still there.

    In E2, put
    =INDEX('M2'!$B$2:$N$22,MATCH(CEILING(B2,1),'M2'!$A$2:$A$22,0),MATCH(CEILING(C2,1),'M2'!$B$1:$N$1,0))
    And that works. Thank you very much. We'll call this one solved. (don't see where I post that)

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

    Re: INDEX MATCH function returns result #N/A

    Great, glad it worked out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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