Excel - Compute the median by date and sector

Solution 1:

If you have Office 365:


Note that I created a Table from the data and am using structured references, but you can change this to regular addressing if you prefer

I4: =MEDIAN(FILTER(Table1[Value],(Table1[Date]=G4)*(Table1[Sector]=H4)))

enter image description here

If you do not have Excel 365, you can use

= MEDIAN(AGGREGATE(14,6, 1/((Table1[Date]=G4)*(Table1[Sector]=H4))*Table1[Value],ROW(INDEX($A:$A,1):INDEX($A:$A,SUMPRODUCT((Table1[Date]=G4)*(Table1[Sector]=H4))))))