I need to return a median of only a certain category on a spreadsheet. Example Below:

```Airline    5
Auto       20
Auto       3
Bike       12
Airline    12
Airline    39
```

etc.

How can I create a formula that just returns the airline categories' median value? like Average if, but only for median. I am unable to change the values.

Nov 10, 2022 in Others 741 views

## 1 answer to this question.

Try entering the formula =MEDIAN(IF(\$A\$1:\$A\$6="Airline",\$B\$1:\$B\$6,"")) in another cell and clicking CTRL+SHIFT+ENTER if your categories are in cells A1:A6 and the associated values are in cells B1:B6.

Excel is instructed to treat the formula as an "array formula" when CTRL+SHIFT+ENTER is used. This means that instead of returning a single value in this case, the IF statement instead produces an array of 6 values (one for each cell in the range \$A\$1:\$A\$6). The median of these numbers is then returned by the MEDIAN function.
• 63,720 points

## IF - ELSE IF - ELSE Structure in Excel

If you need to test a condition, ...READ MORE

## Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

## IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE

## How to create a drop-down in excel with custom values

You can accomplish that using code rather ...READ MORE

## EXCEL-Function to find how many people does the oldest female live with

You can try something like this: =ROWS(FILTER(B11:B9291, T11:T9291=MAXIFS(T11:T9291,G11:G9291,2))) It ...READ MORE

## Excel feet and inches to millimeters

There are certain direct formulas to convert ...READ MORE

## Convert image (jpg, png, jpeg) to base64

Try this - it will perform the ...READ MORE