Returning next match to a equal value in a column

前端 未结 1 539
离开以前
离开以前 2021-01-21 13:53

I often need to search through columns to find the match to values and then return the according value. My issue is that INDEXand MATCHalways return t

1条回答
  •  北荒
    北荒 (楼主)
    2021-01-21 13:57

    In B2 use the following standard formula,

    =IFERROR(LARGE(E$2:E$8, ROW(1:1)), "")
    

    Fill down as necessary.

    In C2 use the following standard formula,

    =INDEX(D$2:D$8, AGGREGATE(15, 6, ROW($1:$7)/(E$2:E$8=B2), COUNTIF(B$2:B2, B2)))
    

    Fill down as necessary.

            

    [Optional] - Repair the ranking in column A.

    In A2 use the following formula,

    =SUMPRODUCT((B$2:B$8>=B2)/(COUNTIFS(B$2:B$8, B$2:B$8&"")))
    

    Fill down as necessary.

            

    0 讨论(0)
提交回复
热议问题