Forum Discussion

therealerika's avatar
therealerika
Copper Contributor
Mar 17, 2023
Solved

INDEX-MATCH Multiple Results Horizontally

I have no idea what I’m doing and really need help! I’m trying to create a formula that will automatically fill in ‘approved’ items from the bottom chart on the CPP SPACE sheet to the corresponding ‘...
  • NikolinoDE's avatar
    Mar 18, 2023

    therealerika 

     

    You can try this formula (haven't tried it mysel) in cell F25 on CPP SPACE sheet:

     

    You need to use an array formula that combines INDEX, MATCH, SMALL and IF functions to return multiple values horizontally based on a given criteria.

     

    =INDEX(‘SHEET 2’!F$45:F$85,SMALL(IF(‘SHEET 2’!$C$45:$C$85=$D25,ROW(‘SHEET 2’!$C$45:$C$85)-MIN(ROW(‘SHEET 2’!$C$45:$C$85))+1,“”),COLUMN(A1)))

     

    And then drag it across horizontally to fill the rest of the cells.

    This should return the items that match the space code and are approved.

     

    The basic syntax of the formula is:

    =INDEX(return_range,SMALL(IF(criteria_range=criteria,ROW(criteria_range)-MIN(ROW(criteria_range))+1,“”),COLUMN(A1)))

    You need to enter this formula as an array formula by pressing Ctrl+Shift+Enter.

     

    I hope this helps.

Resources