Conditional Min and Max in Excel 2010

前端 未结 5 606
情书的邮戳
情书的邮戳 2020-12-06 13:13

\"enter

I would like to find Min and Max of Quantity (Column 2) based on Type (coloumn

5条回答
  •  执笔经年
    2020-12-06 13:52

    This works without ctrl+shift+enter, but your table should be sorted by a TYPE column.

    Let's assume that your table is placed in B3:C15, then in A4 put

    =IF(B4=B3;A3;A3+1)
    

    in E4 - "1", in E5 - "2" , in E6 - "3", in F4 put:

    =MAX(INDIRECT("C" & MATCH(E4;$A$1:$A$17;0) & ":C" & MATCH(E4;$A$1:$A$17;1) ))
    

    and copy it to F5 and F6

    in G4 put:

    =MIN(INDIRECT("C" & MATCH(E4;$A$1:$A$17;0) & ":C" & MATCH(E4;$A$1:$A$17;1) ))
    

    and copy it to G5 and G6

    MATCH function handles strings incorrectly, so I had to number TYPEs, you can use VLOOKUP to change numbers in column E to a strings

    In my table I used this solution to find strings with maximum values this way:

提交回复
热议问题