Retrive Median Value bases on Criteria

Sufiyan97

Well-known Member
Joined
Apr 12, 2019
Messages
1,538
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
I have below table and expected results are given in column K


Excel.xlsx
ABCDEFGHIJKLMN
1Group AGroup AMatch 1Match 2Total
2Group A60R303060Match 13
3Group A57J273057
4Group A49M252449Group A60ManualA's Top
5 
6Group BGroup BGroup B58ExpectedB's Second
7Group B57K322557
8Group B58A312758This should be the resultGroup C78ExpectedC's second
9Group B59V312859
10 
11Group CGroup C
12Group C60K293078This should be the result
13Group C61A312979
14Group C62V252475
15
16
17
Absolute Points
Cell Formulas
RangeFormula
B2:B4,B7:B9B2=+F2
F2:F4,F7:F9F2=+D2+E2
A2:A14A2=IF(C2="","",IF(ISNUMBER(SEARCH("Group",C2)),C2,A1))
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I tried and got it worked for me, if someone has better idea than this for Office 2013 then please suggest

Excel.xlsx
ABCDEFGHIJKL
1Group AGroup AMatch 1Match 2Total
2Group A60R303060Match 13
3Group A57J273057
4Group A49M252449Group A60Manual
5 
6 Group BGroup B58Expected
7Group B57K322557 
8Group B58A312758This should be the resultGroup C78Expected
9Group B59V312859
10 
11 Group C
12Group C60K293078This should be the result
13Group C61A312979
14Group C62V252475
15 
16
17
Sheet2
Cell Formulas
RangeFormula
B3:B4,B7:B9B3=+F3
F2:F4,F7:F9F2=+D2+E2
J6:J8J6=IFERROR(MEDIAN(IF($A$2:$A$14=I6,($F$2:$F$14)/($F$2:$F$14<>0),"")),"")
A2:A15A2=IF(C2="","",IF(ISNUMBER(SEARCH("Group",C1)),C1,A1))
 
Upvote 0
Hello

Mappe12
ABCDEFGHIJK
1GroupPlayerMatch 1Match 2TotalGroupMedianMedianMedian
2AR303060A575757
3AJ273057B585858
4AM252449C595959
5BK322557
6BA312758
7BV312859
8CK293059
9CA312960
10CV252449
Tabelle3
Cell Formulas
RangeFormula
H2:H4H2=UNIQUE(A2:A10)
I2:I4I2=AGGREGATE(17,6,($E$2:$E$10)/($A$2:$A$10=H2),2)
J2:J4J2=AGGREGATE(19,6,($E$2:$E$10)/($A$2:$A$10=H2),2)
K2:K4K2=MEDIAN(IF($A$2:$A$10=H2,$E$2:$E$10))
E2:E10E2=C2+D2
Dynamic array formulas.
 
Upvote 0
Solution
Thank you very much Shift-Del.

Can you please explain what 17 and 19 QURARTILE INC and EXC function does.
 
Upvote 0
All three formula calculate the median.
Look at the help articles for AGGREGATE(), QUARTILE.INC() and QUARTILE.EXC().
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,443
Members
448,898
Latest member
drewmorgan128

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top