Link to home
Start Free TrialLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

asked on

Calculate average of X largest / smallest numbers

Folks,
I am using the following function to calculate the average of the five largest numbers:
=AVERAGE(LARGE(A:A,{1,2,3,4,5}))

Open in new window


What I would like to be able to do is rather than hard code the function to find the X number of largest or smallest values is to enter in a cell the number. For example, cell C2 = the number of X largest numbers (acting like a variable) and C3 = the number of X smallest numbers (acting like a variable)
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Frank Freese

ASKER

thank you - that got what I needed
Appreciate it