Median Formula

robfl22

Board Regular
Joined
Jan 29, 2009
Messages
87
I have the game scores from every nba game this season in a table. I am trying to figure out the MEDIAN for each NBA team. I know how to get each teams Away Median Score and Home Median Score by using =MEDIAN(IF(nba_2122_schedule[Away Team]=SDs!A3,IF(ISNUMBER(nba_2122_schedule[Away Score]),nba_2122_schedule[Away Score]))). However, what I cannot figure out is to how to get an OVERALL MEDIAN . any help would be appreciated.


1644073516617.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
The total median formula assumes a score of 0 will not occur. If there is a 0 score it will calculate incorrectly.

Book1
ABCDEFGHIJKL
1DateAway TeamHome TeamAway ScoreHome Score
22/5/2022AD88124using LET functionwithout LET function
32/2/2022CD102117TeamAway MedianHome MedianTotal MedianTotal Median
42/5/2022BC11091A888988.588.5
51/31/2022CA8789B106.5131.5119.5119.5
62/5/2022AB138129C94.510196.596.5
71/29/2022BD103101D141117120.5120.5
82/5/2022DC141111
91/27/2022AB82134
10
Sheet3
Cell Formulas
RangeFormula
H4:H7H4=MEDIAN(IF(Table1[Away Team]=$G4,Table1[Away Score],""))
I4:I7I4=MEDIAN(IF(Table1[Home Team]=$G4,Table1[Home Score],""))
J4:J7J4=LET(s,(Table1[Away Team]=$G4)*Table1[Away Score]+(Table1[Home Team]=$G4)*Table1[Home Score],MEDIAN( IF(s,s,"")))
K4:K7K4=MEDIAN( IF((Table1[Away Team]=$G4)*Table1[Away Score]+(Table1[Home Team]=$G4)*Table1[Home Score],(Table1[Away Team]=$G4)*Table1[Away Score]+(Table1[Home Team]=$G4)*Table1[Home Score],""))
 
Upvote 0
Solution
The total median formula assumes a score of 0 will not occur. If there is a 0 score it will calculate incorrectly.

Book1
ABCDEFGHIJKL
1DateAway TeamHome TeamAway ScoreHome Score
22/5/2022AD88124using LET functionwithout LET function
32/2/2022CD102117TeamAway MedianHome MedianTotal MedianTotal Median
42/5/2022BC11091A888988.588.5
51/31/2022CA8789B106.5131.5119.5119.5
62/5/2022AB138129C94.510196.596.5
71/29/2022BD103101D141117120.5120.5
82/5/2022DC141111
91/27/2022AB82134
10
Sheet3
Cell Formulas
RangeFormula
H4:H7H4=MEDIAN(IF(Table1[Away Team]=$G4,Table1[Away Score],""))
I4:I7I4=MEDIAN(IF(Table1[Home Team]=$G4,Table1[Home Score],""))
J4:J7J4=LET(s,(Table1[Away Team]=$G4)*Table1[Away Score]+(Table1[Home Team]=$G4)*Table1[Home Score],MEDIAN( IF(s,s,"")))
K4:K7K4=MEDIAN( IF((Table1[Away Team]=$G4)*Table1[Away Score]+(Table1[Home Team]=$G4)*Table1[Home Score],(Table1[Away Team]=$G4)*Table1[Away Score]+(Table1[Home Team]=$G4)*Table1[Home Score],""))
Works Perfectly....Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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