Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default An eqation to add the largest 6 (or N) numbers from a list

I am trying to get an average of list, but if there are more than 6 numbers
in the list to only use the top 6 values. My first thought was some sort of
sum of top six then a count of numbers from the list (in case there are not 6
numbers in the list).
Any help is appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default An eqation to add the largest 6 (or N) numbers from a list

Hi,

Your message header and message body are contradictory is it sum or average?

try this

=AVERAGE(LARGE(A1:A10,ROW(INDIRECT("1:6"))))

change average to sum for sum

Mike

"cellofellow" wrote:

I am trying to get an average of list, but if there are more than 6 numbers
in the list to only use the top 6 values. My first thought was some sort of
sum of top six then a count of numbers from the list (in case there are not 6
numbers in the list).
Any help is appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default An eqation to add the largest 6 (or N) numbers from a list

OOPs

Mised that there may be less than 6 numbers in the range

=AVERAGE(LARGE(A1:A10,ROW(INDIRECT("1:"&MIN(COUNT( A1:A10),6)))))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correct then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

Mike

"Mike H" wrote:

Hi,

Your message header and message body are contradictory is it sum or average?

try this

=AVERAGE(LARGE(A1:A10,ROW(INDIRECT("1:6"))))

change average to sum for sum

Mike

"cellofellow" wrote:

I am trying to get an average of list, but if there are more than 6 numbers
in the list to only use the top 6 values. My first thought was some sort of
sum of top six then a count of numbers from the list (in case there are not 6
numbers in the list).
Any help is appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default An eqation to add the largest 6 (or N) numbers from a list

Try this:

=IF(COUNT(A1:A10)=0,0,IF(COUNT(A1:A10)<=6,AVERAGE( A1:A10),AVERAGE(LARGE(A1:A10,{1,2,3,4,5,6}))))

If there are more than 6 numbers, averages the top 6 numbers.

If there is <=6 numbers, averages what's there.

--
Biff
Microsoft Excel MVP


"cellofellow" wrote in message
...
I am trying to get an average of list, but if there are more than 6 numbers
in the list to only use the top 6 values. My first thought was some sort
of
sum of top six then a count of numbers from the list (in case there are
not 6
numbers in the list).
Any help is appreciated!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default An eqation to add the largest 6 (or N) numbers from a list

Thanks Mike,
For the equation and for interpreting my inconsistency,; it is really
average I was after!

"Mike H" wrote:

OOPs

Mised that there may be less than 6 numbers in the range

=AVERAGE(LARGE(A1:A10,ROW(INDIRECT("1:"&MIN(COUNT( A1:A10),6)))))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correct then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

Mike

"Mike H" wrote:

Hi,

Your message header and message body are contradictory is it sum or average?

try this

=AVERAGE(LARGE(A1:A10,ROW(INDIRECT("1:6"))))

change average to sum for sum

Mike

"cellofellow" wrote:

I am trying to get an average of list, but if there are more than 6 numbers
in the list to only use the top 6 values. My first thought was some sort of
sum of top six then a count of numbers from the list (in case there are not 6
numbers in the list).
Any help is appreciated!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling the largest numbers Melanie Excel Worksheet Functions 2 May 23rd 06 07:33 PM
Highlighting the 5 Largest Numbers in a list [email protected] Excel Discussion (Misc queries) 24 April 17th 06 01:44 PM
3 largest numbers Petros Excel Discussion (Misc queries) 1 November 22nd 05 05:56 PM
return largest number of a list of numbers in the same cell Hells Excel Worksheet Functions 2 October 5th 05 01:52 PM
average of kth largest numbers in an array of n numbers georgeb Excel Worksheet Functions 6 September 5th 05 05:57 AM


All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"