How do you figure out the MEDIAN of a column taking into account filters?

后端 未结 2 1908
逝去的感伤
逝去的感伤 2021-02-19 14:07

I\'ve recently discovered that you can use SUBTOTAL for various functions which allow you to sum up or find totals of a column, even whilst there are filters being

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 14:40

    Updated to pick up comments from lori_m below

    1. Original answer - all xl versions
    Courtesy of Aladin Akyurek from this solution If your data was in A1:A10, array enter this formula with shiftctrlenter =MEDIAN(IF(SUBTOTAL(3,OFFSET(A1:A10,ROW(A1:A10)-MIN(ROW(A1:A10)),,1)),A1:A10))

    2. Updated answer (non-array) - all xl versions =MEDIAN(IF(SUBTOTAL(3,OFFSET(A1:A10,MMULT(ROW(A1:A10),1)-MIN(MMULT(ROW(A1:A10),1)),,1)),A1:A10))

    3. Excel 2010 & Excel 2013
    =AGGREGATE(12,5,A1:A10)

提交回复
热议问题