MEDIAN formula

KittenBreath

New Member
Joined
Nov 20, 2022
Messages
16
Office Version
  1. 2021
Platform
  1. Windows
Hi all, I am trying to calculate a median number using specific criteria and a set cell range. I get an #N/A error. I am using Office 21, which I hate, but that's a whine for a different thread. :)

The formula I am using:

=MEDIAN(IF(Gamelogs!$G$3:$G$5000=A6,Gamelogs!$AR$3:$AR$5))

I am trying to calculate the median minutes from the last 3 games, which are in cells AR3:AR5 on the 'Gamelogs' worksheet.

1674466579667.png


Any help will be appreciated.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I don't follow the logic of your formula. You are checking almost 5000 cells against A6 and if they match you want the median of a specific 3 cells? Your formula will give you an array of outputs and it's not really clear to me what you expect the result to be. Do you want the median of AR3:AR5 if any of the cells in G3:G5000 on Gamelogs matches A6?
 
Upvote 0
Hi Rory, yes, I'm trying to get the median of the numbers in cells AR3:AR5, which contain the information on the last 3 games for Luka Doncic (A6). The name in cell A6 will change daily, depending on games and lineups for the day, as will the cell positions of players on the Gamelogs worksheet. That's why I have it set to search the entire range of G3:G5000 for a specific name in a specific cell.

Ideally, I would like it to search the G3:G5000 range and return the median of the 3 most recent games, but I figured the easiest way to do it was to have the information for the last 3 in specific cells (AR3:AR5) so that I could just reference those cells.
 
Upvote 0
I'm still not really clear. If the values in Ar3:Ar5 are specific to whomever is listed in A6, don't you just need the median of those cells without any sort of IF clause?
 
Upvote 0
Solution

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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