AVERAGEIFS Function

kipper19

Board Regular
Joined
Apr 12, 2014
Messages
92
Office Version
  1. 365
Platform
  1. Windows
Would anyone know how to average say the highest 20 numbers out of 200-300 numbers in a AVERAGEIFS statement
I have tried the following but it did not work,
=AVERAGEIFS(E2:E940000,">="&LARGE(E2:E940000,20),A2:A940000,K4,B2:B940000,J4,C2:C940000,I4)<o:p></o:p>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try:

=AVERAGE(LARGE(IF(A2:A940000=K4,IF(B2:B940000=J4,IF(C2:C940000=I4,E2:E940000))),ROW(INDIRECT("1:20"))))

with Control+Shift+Enter.

It's noticeably slow, but that's due to the large range, and still calculates in under a second.
 
Upvote 0
The first part of AVERAGEIFS needs to be the "average range", looks like you have this as the first criteria.

=AVERAGEIFS(E2:E940000,">="&LARGE(E2:E940000,20),A2:A940000,K4,B2:B940000,J4,C2:C940000,I4)

Assuming your range to average is E2:E940000 try:

=AVERAGEIFS(E2:E940000,E2:E940000,">="&LARGE(E2:E940000,20),A2:A940000,K4,B2:B940000,J4,C2:C940000,I4)
 
Upvote 0
Ahoy,
Thank you but this version brought up a #DIV/0" error


QUOTE=AhoyNC;5013548]The first part of AVERAGEIFS needs to be the "average range", looks like you have this as the first criteria.

=AVERAGEIFS(E2:E940000,">="&LARGE(E2:E940000,20),A2:A940000,K4,B2:B940000,J4,C2:C940000,I4)

Assuming your range to average is E2:E940000 try:

=AVERAGEIFS(E2:E940000,E2:E940000,">="&LARGE(E2:E940000,20),A2:A940000,K4,B2:B940000,J4,C2:C940000,I4)
[/QUOTE]
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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