+ Reply to Thread
Results 1 to 13 of 13

Index and match array formula

  1. #1
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Index and match array formula

    Hi guys,

    I am trying to list in Sheet2/ column B, all products made on a given equipment (from “Trains” tab). The corresponding cell where each product is made marked “Y” or “‡”
    I am having these issues
    1. The formula doesn’t work properly. For example, I selected an equipment but the list is showing different products
    2. The list has duplicate product names. Can I remove the duplicate names and sort the list by the highest risk score number)
    3. I need to list in column G all product made on the same equipment excluding the worst-case product.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Index and match array formula

    i think it is better to use helper column to calculate column# just once
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index and match array formula

    Tim, A3 is a drop drown menu and column B is dependent on A3. The formula in column B is not working,

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Index and match array formula

    In B3

    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($C$3)+1,""),ROWS($C$3:$C3))),"")

    in G3


    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($D$3)+1,""),ROWS($D$6:$D6))),"")


    Both ....

    ...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.
    Last edited by JohnTopley; 01-01-2018 at 05:04 PM.

  5. #5
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index and match array formula

    Thanks John,

    Is there anyway to get rid of the duplicate names in column B. Also, I need to exclude the worst-case product from Column G

    list 2.jpg

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Index and match array formula

    i inserted a column, and formulas work properly in it

  7. #7
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index and match array formula

    tim list.jpgThank Tim but when I put another equipment in A3, there should be 4 products listed. With your formula I am getting much more. Please see the image.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index and match array formula

    Sorry I attached John's solution. Here is the file you modified.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Index and match array formula

    Errors in formulae

    In B3

    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($E$3)+1,""),ROWS($C$3:$C3))),"")

    in G3


    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($E$3)+1,""),ROWS($D$6:$D6))),"")


    Both ....

    ...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.

  10. #10
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Index and match array formula

    look carefully
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index and match array formula

    Tim, can you please look at the reference table. there are 5 products made on Tonson Mixer A.

    I am not sure if I am missing something!

    tim.jpg

  12. #12
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index and match array formula

    [QUOTE=JohnTopley;4812268]Errors in formulae

    In B3

    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($E$3)+1,""),ROWS($C$3:$C3))),"")

    in G3


    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($E$3)+1,""),ROWS($D$6:$D6))),"")

    Thanks John. Can the worst case product (E3) be excluded from the list in column G?

    Thank you again

  13. #13
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Index and match array formula

    your formula:
    =IFERROR(INDEX(Trains!$E$4:$FQ$4,SMALL(IF(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Equipment_List,0),0)="Y",COLUMN(Trains!$E$4:$FQ$4)-COLUMN($C$3)+1,""),ROWS($C$3:$C3))),"")
    i did not check up your logic
    should be (my version):
    =IFERROR(AGGREGATE(15,6,(COLUMN(Trains!$E$4:$FQ$4)-COLUMN($D$3)+1)/(INDEX(Trains!$E$13:$FQ$65,MATCH($A$3,Trains!$B$13:$B$65,),)="Y"),ROWS($D$3:$D3)),"")
    Attached Files Attached Files

+ 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, array formula.
    By hurrell8510 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-20-2017, 12:08 PM
  2. Replies: 3
    Last Post: 04-02-2016, 08:16 PM
  3. Index and match array formula
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2015, 12:06 PM
  4. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  5. [SOLVED] Index and Match array formula - Help with this?
    By SwtSinSation in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2014, 09:51 AM
  6. Nested Match(index()) vs. Match() array formula.
    By GeneralDisarray in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2011, 07:57 AM
  7. [SOLVED] Index and Match Array formula
    By Graham Haughs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-15-2006, 09: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