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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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