Get the maximum values of column B per each distinct value of column A

前端 未结 4 1850
野趣味
野趣味 2020-12-17 04:53

I have an Excel spreadsheet of the form:

A,B
X,1
X,5
Y,4
Y,11
X,7
Z,1

I would like to get the maximum value of column B for each distinct v

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 05:35

    Try below. Note I moved your desired output table to Columns D and E. You will not need to hard-code any values into formulas.

    Data

    D   E
    Y   11
    X   7
    Z   1
    

    Formulas

    E2 Formula: ={MAX(--($D1=A1:A6)*B1:B6)}
    E3 Formula: ={MAX(--($D2=A2:A7)*B2:B7)}
    E4 Formula: ={MAX(--($D3=A3:A8)*B3:B8)}
    

提交回复
热议问题