Forum Discussion

Gamer85308's avatar
Gamer85308
Copper Contributor
May 11, 2023
Solved

Using INDEX and Match when the column in the second MATCH argument changes

Hello, I am using Office 365 and I this is my first post! I am using this formula and I need to change it  =INDEX(Data!$B$5:$B$144, MATCH(I7,Data!$I$5:$I$144, 0)) The formula pulls the appropriat...
  • mtarler's avatar
    May 12, 2023

    I see that you have SEQUENCE in that second formula so that tells me you have Excel 365 (I believe)
    In that case you can AND SHOULD replace both formulas with the new available formulas.
    For example you can:
    =TAKE(SORT(FILTER(Data!$G$5:$T$144, I$6=Data!$G$4:Data!$T$4),,-1),10)
    So basically filter the whole table (g5:t144) based on the column header = this column header, and then sort it and then finally take the first 10 values.
    For the other column I would do something similar:
    =TAKE(SORT(Data!$B$5:$T$144, XMATCH(C$6,Data!$B$4:Data!$T$4),-1),10,1)
    in this case sort the whole tables of data based on the column that matches the header and then take the 10 rows and only the 1st column

Resources