# SOS!! How to create Median formula for multiple criteria?



## michellesssme (Dec 15, 2022)

Hi, 
Anyone know how to create a median formula in cell H4 which fulfil the criteria of highlighted items ?


----------



## michellesssme (Dec 15, 2022)

Sorry, Kindly refer to this latest image.
Anyone know how to create a median formula in cell H4 which fulfil the criteria of highlighted items after key in the name in cell H3?


----------



## shift-del (Dec 15, 2022)

Hi


```
=MEDIAN(FILTER(D4:D10,A4:A10=H3))
```
Untested.


----------



## michellesssme (Dec 15, 2022)

shift-del said:


> Hi
> 
> 
> ```
> ...


Thank you for the reply. By the way, May I know how to modify the provided formula which exclude the data of Name "A" WITH Purpose "D"?


----------



## Peter_SSs (Dec 15, 2022)

Try

```
=MEDIAN(FILTER(D4:D10,(A4:A10=H3)*(B4:B10<>"D")))
```

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. You will generally get faster/better responses that way.


----------

