Forum Discussion
Deleted
Nov 03, 2017Excel 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 ...
- 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.
SergeiBaklan
Nov 03, 2017Diamond Contributor
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.