Medianifs - please help translate an averageifs formula

mahashakti

New Member
Joined
Jun 24, 2015
Messages
3
The following is a well functioning averageifs formula. I need a formula that will look at the same criteria and return the median for the given ranges. Please help translate this. I've been googling and don't see this complicated of a question anywhere. (Thank you in advance!)

=IFERROR(AVERAGEIFS('Transaction Detail'!$L:$L,'Transaction Detail'!$A:$A,$A18,'Transaction Detail'!$J:$J,">"&N$17,'Transaction Detail'!$J:$J,"<"&N$18),"N/A")
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Thank you, I will watch this later! My question was solved with and array formula. Push Ctrl+Shift+Enter to make it happen!
=MEDIAN(IF('Transaction Detail'!A:A=A18,IF('Transaction Detail'!J:J>0.0001,IF('Transaction Detail'!J:J<=10000000,'Transaction Detail'!L:L,"N/A"))))
 
Upvote 0
The following is a well functioning averageifs formula. I need a formula that will look at the same criteria and return the median for the given ranges.
Rich (BB code):
=IFERROR(AVERAGEIFS('Transaction Detail'!$L:$L,'Transaction Detail'!$A:$A,$A18,
'Transaction Detail'!$J:$J,">"&N$17,'Transaction Detail'!$J:$J,"<"&N$18),"N/A")

Array-enter the following formula (press ctrl+shift+Enter instead of just Enter):
Rich (BB code):
=IFERROR(MEDIAN(IF('Transaction Detail'!$A$1:$A$10000=$A18,
IF('Transaction Detail'!$J$1:$J$10000>N$17,
IF('Transaction Detail'!$J$1:$J$10000 lt N$18,'Transaction Detail'!$L$1:$L$10000)))),"N/A")

Note: Replace "lt" with "<". This forum's interface has trouble when I type the symbol in that context. (Sigh.)

Note that I write $A$1:$A$10000 instead of $A:$A. It is always risky to write $A:$A because it might cause Excel 2007 and later to process 1+ million rows. But it is even more important in array-entered formulas because it does cause Excel 2007 and later to create one or more arrays of 1+ million rows.

You probably never will have 1+ million rows of data. But if you might have more then 10,000 rows, choose a larger number. Just be sure to be consistent in all ranges in the array-entered formula.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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