Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
pilaar39 - ExcelForums.com
 
Posts: n/a
Default Selecting the top 4 largest value cells??

I am tryijng to sum the largest 4 values in a column of cells.

I used:
SUM(LARGE(A1:A10,{1,2,3,4}))
which seems to work fine in general,
however, if any of the top 4 largest values is the same, then it
yeilds an incorrect sum.

How can I overcome this failure? I need to include duplicate values in
my sum.

  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

That formula works fine. How is the sum incorrect? You don't want to double
(or triple, or quadruple) count duplicates?

If you want the sum of the four largest unique values, how would you handle
the case where you have only three unique values?

HTH,
Bernie
MS Excel MVP


"pilaar39 - ExcelForums.com" wrote
in message ...
I am tryijng to sum the largest 4 values in a column of cells.

I used:
SUM(LARGE(A1:A10,{1,2,3,4}))
which seems to work fine in general,
however, if any of the top 4 largest values is the same, then it
yeilds an incorrect sum.

How can I overcome this failure? I need to include duplicate values in
my sum.



  #3   Report Post  
bj
 
Posts: n/a
Default

try
=large(A1:A10,1)+if(is error(large(A1:A10,2),large(A1:A10,1),Large(A1:A10 ,2))+
if(is error(large(A1:A10,3),if(is
error(large(A1:A10,2),large(A1:A10,1),Large(A1:A10 ,2)),Large(A1:A10,3))+if(is
error(large(A1:A10,4),if(is error(large(A1:A10,3),if(is
error(large(A1:A10,2),large(A1:A10,1),Large(A1:A10 ,2)),Large(A1:A10,3)),large(A1:A10,4))))
I lost track of my parenthesis, so forgive me if you have to play with the
Parenthesis.

"pilaar39 - ExcelForums.com" wrote:

I am tryijng to sum the largest 4 values in a column of cells.

I used:
SUM(LARGE(A1:A10,{1,2,3,4}))
which seems to work fine in general,
however, if any of the top 4 largest values is the same, then it
yeilds an incorrect sum.

How can I overcome this failure? I need to include duplicate values in
my sum.


  #4   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Might not be the best way, but might just work.

You have your number in say A1:A10.
Enter their ranks in B1:B10 by using the formula:
=RANK(A1,$A$1:$A$10)
and copy down.

For the required total, use the formula:
=SUMPRODUCT(--(B1:B10=1),A1:A10)+IF(COUNTIF(B1:B10,1)<4,SUMPRODU CT(--(B1:B10=2),A1:A10),0)+IF(COUNTIF(B1:B10,"<3")<4,SU MPRODUCT(--(B1:B10=3),A1:A10),0)+IF(COUNTIF(B1:B10,"<4")<4,SU MPRODUCT(--(B1:B10=4),A1:A10),0)


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=377739

  #6   Report Post  
Jack Sprat
 
Posts: n/a
Default

Actually, I think I made a mistake.. I 'thought' it was not working
correctly, but turns out it is.

What in fact I was doing, was setting up a sheet to track scores. But, in
this league, we only count the top 4 scores. So, if there were 8
participants, I wanted to sum up the total of the top 4, or the largest
values in a groups of cells. Example, if the cells had:
4,5,6,7,10,10,10,10, and I wanted the top 4 scores, I should have a result
of 40 in this case. Yes, I wanted to include duplicates.

At first I thought the function was not working, but now on closer
inspection, it appears to be working exactly as I want.

Sorry for the confusion and any unnecessary work I caused with this
question.

pl


"pilaar39 - ExcelForums.com" wrote
in message ...
I am tryijng to sum the largest 4 values in a column of cells.

I used:
SUM(LARGE(A1:A10,{1,2,3,4}))
which seems to work fine in general,
however, if any of the top 4 largest values is the same, then it
yeilds an incorrect sum.

How can I overcome this failure? I need to include duplicate values in
my sum.



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
Selecting cells using shortcut keys not mouse Griff Excel Discussion (Misc queries) 2 April 14th 05 09:15 AM
selecting multiple cells with ctrl key JDW Charts and Charting in Excel 0 March 30th 05 10:49 PM
Excel 97 - Selecting multiple cells from 2 different Pivot Tables jjones_HAB Excel Discussion (Misc queries) 0 March 1st 05 12:01 PM
Selecting shaded cells in a row Al Excel Worksheet Functions 5 January 25th 05 05:31 AM
Ranking cells largest to smallest jim314 Excel Discussion (Misc queries) 1 January 10th 05 09:01 PM


All times are GMT +1. The time now is 12:28 PM.

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"