+ Reply to Thread
Results 1 to 6 of 6

Index Formula Help

  1. #1
    Forum Contributor
    Join Date
    10-13-2015
    Location
    California
    MS-Off Ver
    Office 2013
    Posts
    138

    Index Formula Help

    I am trying to get an index formula to work and achieve the following:

    I will have one sheet with a lot of data: part number(A) location(b) and qty(c) that are the important columns for this project.

    I will have a search sheet part number(A) location(b) and qty(c).

    Part Number 123 entered into ("A2") could have 9 locations and 9 qty so what I would like to do is use an index formula to return all the matching values from the master sheet for columns (B) and (C).

    I know it should be an easy index formula within an iferror that I could just drag down and should populate all results I just cant get it to work

    Please advise
    Test.xlsx

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index Formula Help

    On Sheet2 of your spreadsheet enter Part# in cell D1 123
    then enter array formula in A2 and copy acorss and then down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ***Array formula
    ...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.
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    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
    81,164

    Re: Index Formula Help

    This should help:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    1
    Part Number Location QTY
    123
    2
    123
    S01-T01
    25
    3
    123
    S01-T02
    26
    4
    123
    S01-T03
    27
    5
    123
    S01-T04
    28
    Sheet: Sheet2

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    1
    Part Number Location QTY
    123
    2
    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:1))),"")
    =IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:1))),"")
    =IFERROR(INDEX(Sheet1!C:C,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:1))),"")
    3
    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:2))),"")
    =IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:2))),"")
    =IFERROR(INDEX(Sheet1!C:C,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:2))),"")
    4
    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:3))),"")
    =IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:3))),"")
    =IFERROR(INDEX(Sheet1!C:C,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:3))),"")
    5
    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:4))),"")
    =IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:4))),"")
    =IFERROR(INDEX(Sheet1!C:C,SMALL(IF(Sheet1!$A$2:$A$8=Sheet2!$D$1,ROW(Sheet1!$A$2:$A$8)),ROWS($1:4))),"")
    Sheet: Sheet2
    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.

  4. #4
    Forum Contributor
    Join Date
    10-13-2015
    Location
    California
    MS-Off Ver
    Office 2013
    Posts
    138

    Re: Index Formula Help

    Thank you both!

  5. #5
    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
    81,164

    Re: Index Formula Help

    You're welcome!

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index Formula Help

    You're welcome. Please don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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] New to INDEX...INDEX FORMULA NOT WORKING
    By 34_CHEVY in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 03-31-2016, 02:10 PM
  2. [SOLVED] This formula works but I donīt understand why Index(Index) match
    By campelliann in forum Excel General
    Replies: 2
    Last Post: 01-25-2016, 05:55 PM
  3. Index Match Formula, can index be fixed?
    By herschen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-02-2015, 08:28 PM
  4. [SOLVED] IF & INDEX Formula =INDEX(D11:D59,COUNTA(D11:D59),1)
    By GC1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2013, 08:11 AM
  5. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  6. Replies: 2
    Last Post: 11-21-2012, 12:02 PM
  7. Index Match Index Formula work slow
    By avk in forum Excel General
    Replies: 9
    Last Post: 03-07-2012, 02:19 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