To calculate the median and ignore blanks in Excel, use the following formula:
Formula:
=MEDIAN(IF(range<"",range))
Here,
"range" refers to the range of cells that you want to calculate the median for. The
IF function checks if each cell in the range is not blank, and returns an array of values that meet the criteria. The
MEDIAN function then calculates the median of the non-blank values.
To use this formula, follow these steps:
- Select the cell where you want to display the median.
- Type the formula =MEDIAN(IF(range<"",range)), replacing "range" with the actual range of cells you want to calculate the median for.
- Press Ctrl+Shift+Enter to enter the formula as an array formula. This tells Excel to treat the formula as a single unit and calculate it for each cell in the range.
- The cell should now display the median of the non-blank values in the range.