+ Reply to Thread
Results 1 to 14 of 14

Index match formula retunring first occurence

  1. #1
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Index match formula retunring first occurence

    Hello, and thank you to anyone who can help, I am greatly appreciative!

    I am using an index formula in a longer string of formulas, but I have determined that there is something wrong with my index.

    Here is my formula: =INDEX(Purchases[Quantity],MATCH(10013863,Purchases[SKU No.],0),)
    The "Purchases" reference is a table on a different worksheet. There are several SKUs and several iterations of the 10013863 SKU. There is a quantity for each SKU.
    I selected ONLY the data and not the column headers.

    My expectation is that I would get a #VALUE! from this formula as it would see lots of possible matches. I would then expect to run an F9 and see a what data is being returned as true. Then I can add it to the sumprocuct formula to get where I need to go.

    What I am seeing: is a reutrn of the first quantity amount for SKU 10013863.

    Why is it stopping at the first occurence?

    I feel like there is an easy answer out there, but I'm just too "blind/tired" to see it.

    Thank you again and please let me know if I can provide more clarity.

  2. #2
    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,933

    Re: Index match formula retunring first occurence

    Hi, welcome to the forum

    Quote Originally Posted by Dinah_M View Post
    ...I feel like there is an easy answer out there, but I'm just too "blind/tired" to see it...
    Yes there is - that's the way Index/Match (and vlookup) works - it stops looking when it finds a match.

    If you want to pull all occurrences of a certain SKU, you could probably use the index/small/if ARRAY function, but to offer better help, we would need to see a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

  3. #3
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Index match formula retunring first occurence

    Hmm, okay. I was thinking that Index/Match could work with SUMPRODUCT to return a number of items in a sum of a "chosen" column.

    I will see if I can create a small simple version of what I am trying to do. My project is probably bigger than me, so I am SO grateful for expertise!

  4. #4
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Index match formula retunring first occurence

    I have created a synopsis version of my WB, but am having issues uploading an .xlsx work book. It is under the KB limit. I have tried Manage Attachments, but always get a error notice: Upload of file failed.

    I've turned off my firewall, and followed the instructions at the tutorial to a T (not that it is difficult to figure out), but it just won't accept the file.

    Thank you for your time!
    Last edited by Dinah_M; 09-26-2018 at 03:46 AM.

  5. #5
    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
    44,036

    Re: Index match formula retunring first occurence

    Many members don't like them.... but you could try a 3rd party file hosting site....

    That said, sometimes I get teh same message, usually when I'm ravelling and using a flakey www connection. Try, try and try again.

    I assume that its something like these instructions you're following:

    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

  6. #6
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Index match formula retunring first occurence

    Maybe this upload will take.

    Thanks again.
    Attached Files Attached Files
    Last edited by Dinah_M; 09-26-2018 at 02:29 PM.

  7. #7
    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,933

    Re: Index match formula retunring first occurence

    Try this.

    1. I notice your formula does not look at the months, will there only ever be 1 entry/month?
    2. If only 1 entry, try this...
    =INDEX($D:$D,SMALL(IF($C$21:$C$43=$B$1,ROW($A$21:$A$43)),ROWS($A$1:A1)))
    ARRAY entered ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Then copy down.

  8. #8
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Index match formula retunring first occurence

    WOW FDibbins, that formula does a very nice job. You cannot believe how grateful I am, yesterday was not a pleasant day!

    I never want to take advantage of someone's time, yours in this case, but if possible can you briefly explain the SMALL formula? I am not familiar and it may help me in future efforts.

    Thank you again, most sincerely!

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

    Re: Index match formula retunring first occurence

    Happy to help, and you are not taking advantage of anything. We prefer to teach, rather than to just spoon-feed.

    The attached site does a far better job of explaining how this all works...
    https://fiveminutelessons.com/learn-...le-values-list

    Slightly different but essentially the same.

  10. #10
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Index match formula retunring first occurence

    I've had a little trouble when I used this on my full WB, partially because I do have multiple years in the date column. As I look at the data, I also notice there are times when an SKU/Style# can have multiple entries per month.
    Sorry! This company is new to me and I failed to see that pattern.

  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
    44,036

    Re: Index match formula retunring first occurence

    Can you post a sample sheet,complete with more representative data AND your expected results?

  12. #12
    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,933

    Re: Index match formula retunring first occurence

    Yeah I kinda figured you might have duplicates in any month lol

    1. If you change the text dates to real dates in A4:A15, you can eliminate col B altogether, and do away with C4:C15. Just enter the 1st of the month (1/1/2018, 2/1/2018 etc) and set the format to MMM). Then let the ARRAY formula do the work for you.
    2. Are you looking to SHOW all matching criteria, or SUM them?

    to SHOW them all...
    =IFERROR(INDEX($D:$D,SMALL(IF(($C$21:$C$53=$B$1)*($A$21:$A$53>=$A$4)*($A$21:$A$53<=EOMONTH($A$4,0)),ROW($A$21:$A$53)),ROWS($A$1:A1))),"")
    CSE and then copy down

    to SUM them all, use this regular formula
    =SUMIFS($D$21:$D$53,$C$21:$C$53,$B$1,$A$21:$A$53,">=$"&$A4,$A$21:$A$53,"<="&EOMONTH($A$,0))
    copied down

    I added 2 more sets of Jan data to test with. See the attached file.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    09-26-2018
    Location
    Nevada, USA
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Index match formula retunring first occurence

    You are TOO great! I was right there with you and finally found a solution that was pretty much exactly what you cam up with! I am eternally grateful and hope this information can help others!

    Many, many thanks!!

  14. #14
    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,933

    Re: Index match formula retunring first occurence

    Happy to help and thanks for the kind words and feedback

+ 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. Finding the max occurence with the INDEX, MATCH and MAX formula
    By greengirl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-06-2015, 11:37 AM
  2. Using Index and match to find last occurence
    By morbdetro in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2014, 01:25 PM
  3. [SOLVED] Index And Match to find second occurence Help wanted
    By tropsog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-16-2013, 12:24 PM
  4. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  5. Multiple value occurence index/match
    By mechen8 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-01-2012, 07:01 AM
  6. Excel 2007 : lookup retunring multiple values
    By Icehockey44 in forum Excel General
    Replies: 5
    Last Post: 07-27-2012, 05:11 AM
  7. Replies: 5
    Last Post: 02-29-2012, 08:51 PM

Tags for this Thread

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