Forum Discussion
luna155
Aug 19, 2020Copper Contributor
Excel
Hi. I have two columns A and B. I would like to calculate the median of the data in A only if it in B says "Yes". Can anybody help my with the command for this? Thanks
5 Replies
- PMF_EXCELCopper Contributorcertainly possible if you use a "sumproduct" search on web sommeproduct + median best PMF_EXCEL
- SergeiBaklanDiamond Contributor
As variant
=MEDIAN(IF(B:B="Yes",A:A))using as it is on Excel with dynamic arrays or entered as array formula by Ctrl+Shift+Enter in other case.
- luna155Copper Contributor
Thank you very much - was a great help!
SergeiBaklan
- Ramiz_AssafIron Contributor
I used a third column saying if(B1="Yes",A1,"")
then I took the median of column C
see the attached file
- luna155Copper ContributorThank you very much!