+ Reply to Thread
Results 1 to 7 of 7

Index Match returning values when none should be returned

  1. #1
    Registered User
    Join Date
    03-21-2014
    Location
    Johannesburg
    MS-Off Ver
    Excel 2010
    Posts
    7

    Index Match returning values when none should be returned

    Hi guys, I realise my subject line is a little confusing.
    My issue is I have 2 spreadsheets Receive & Recon.
    On the Receive sheet I record goods received in a simple table form per date.
    On the Recon sheet I have all the items I receive brought across from the item column per day.
    I use the Index Match formula to identify the quantity & cost of the item received and populate the day relevant day columns.
    The formula I use is: =INDEX(Receive!$E$3:$K$1000,MATCH(H$1,Receive!$E$3:$E$1000,MATCH($E3,Receive!$H$3:$H$1000,0)),6)
    The issue is that the formula continues to populate the cells even when there is no data available for the relevant date. It continues to use the last value available.
    I think what is happening is that in the first Match command (matching the dates) is not exact "0" When the formula is evaluated it returns a "1" or greater than value
    I have attached a copy of my sheets & would appreciate any help in getting this resolved.
    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Index Match returning values when none should be returned

    Here is the function fixed up.
    You cannot add to lookup referenced in the Row part of the Index Function. I had to get around this by using a concatenated column. See column J in sheet Received.
    Attached Files Attached Files
    Regards,
    Rudi

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Index Match returning values when none should be returned

    You probably want a formula looking more like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Edit: This is an array formula, it has to be entered with Ctrl + Shift + Enter.
    Attached Files Attached Files
    Last edited by Jacc; 04-26-2014 at 09:42 AM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Registered User
    Join Date
    03-21-2014
    Location
    Johannesburg
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Index Match returning values when none should be returned

    Hi Rudi,

    thanks for this.
    It really helps. Your work-around is quite easy & I can maintain the neatness of the sheets by hiding & protecting the concantenated cells.
    Once again, many thanks
    Khaos.

  5. #5
    Registered User
    Join Date
    03-21-2014
    Location
    Johannesburg
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Index Match returning values when none should be returned

    Hi Jacc,

    your formula when I copy it to my spreadsheet returns a #N/A error. I'm not sure why it does this as the Array selection on the index command is only slightly different.
    I'm not sure I understand what the 1 reference in the Match command is? Can you please explain what this does as I imagine it is the reason for the #N/A on my side.
    Many thanks
    Khaos

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Index Match returning values when none should be returned

    Did you enter the formula with Ctrl + Shift + Enter? You can't just copy the formula as the formula will end with 6 in every other column and 7 in every other column. I just made the two first ones two work, one ending with 6 and one ending with 7 and then I copy/pasted them as a pair. Also the date reference has to skip every other cell (sorry, the merging thing does not help). The layout is quite awkward if you ask me and creating a formula that you can just copy right is difficult. Don't know if you saw that but I made an alternative layout on another sheet in my workbook in post #3.

    The 1 in my MATCH formula is not the reason for error (didn't you download the workbook I posted? it works perfectly well there). As you can see there are two statements in the match formula, each one of them can evaluate to either true or false. Both of them has to be true for the match to occur. Normally the AND function would be used to find out if both statements are true. However, this is an array formula and the AND function does not work in array formulas. Instead of using AND I'm multiplying the two logic values with each other and Excel then evaluates TRUE as 1 and FALSE as 0. Hence, the multiplication will do the job of an AND function in this case. Only the rows were both statements are true will generate a 1. Hence, using MATCH(1,xxxxx,0) will give the row number for where both statements are true.

  7. #7
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Index Match returning values when none should be returned

    A sumifs function will do the job assuming you're using 2007 or later.

    =SUMIFS(Receive!$H:$H,Receive!$C:$C,Recon!D$1,Receive!$F:$F,Recon!$A3) for the quantity or =SUMIFS(Receive!$I:$I,Receive!$C:$C,Recon!D$1,Receive!$F:$F,Recon!$A3) for the cost.
    Last edited by gak67; 04-27-2014 at 11:14 PM.

+ 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: 6
    Last Post: 03-01-2014, 11:56 PM
  2. Duplicate values returned using Index Match Lookup with Small()
    By jacob@thepenpoint in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-18-2013, 10:48 AM
  3. Index and Match not returning values
    By -Spax- in forum Excel General
    Replies: 11
    Last Post: 12-06-2011, 11:29 AM
  4. Index and Match function returning same values
    By Climaxgp in forum Excel General
    Replies: 4
    Last Post: 12-15-2009, 05:59 AM
  5. Returning MULTIPLE values with Index and Match
    By Fly in forum Excel General
    Replies: 1
    Last Post: 06-01-2006, 12:55 PM

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