Forum Discussion

Deleted's avatar
Deleted
Nov 03, 2017
Solved

Excel 2016: Exclude a specific cell from a range when calculating a median

I'm trying to calculate a median of a range of cells if a certain condition is met. However, I want to exclude one value from a range of cells. I got all the S&P 500 company tickers in column C, the ...
  • SergeiBaklan's avatar
    Nov 03, 2017

    Hi Moritz,

     

    Perhaps something like

    =IFERROR(MEDIAN(IF($G$4:$G$503=G4;IF(ROW(G4)<>ROW($AB$4:$AB$503);$AB$4:$AB$503))),"NA")

    where NA is returned if no more such stickers in the range. Array formula.

     

Resources