help with the Large formula

sonyaquinn

New Member
Joined
Jun 25, 2009
Messages
2
Hi, hoping somebody here can help.
I am trying to calculate the top 3 values in a range of 6 values and sum them.
I was using the large formula =Large(E134:J134,1)+Large(E134:J134,2)+Large(E134:J134,3)
and that was working excellently until I hit a snag.

Basically sometimes there might only be 2 values in my range between E and J or maybe only 1 or on some occasions none. When I run into these situations I of course get the #NUM! error as it can't do what Im asking it too.

Has anybody any suggestions on how I can manage to do what I want, summing the top 3 values, even if there are not 3 values present.

thanks for your time
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hello and welcome to the board,

try

=IF(COUNT(E134:J134)>3,Large(E134:J134,1)+Large(E134:J134,2)+Large(E134:J134,3),SUM(E134:J134))
 
Upvote 0
Welcome to the Board!

This should work:

=IF(ISERROR(LARGE(E134:J134,1)),0,LARGE(E134:J134,1))+IF(ISERROR(LARGE(E134:J134,2)),0,LARGE(E134:J134,2))+IF(ISERROR(LARGE(E134:J134,3)),0,LARGE(E134:J134,3))

If you have Excel 2007 we can shorten this formula to:

=IFERROR(LARGE(E134:J134,1),0)+IFERROR(LARGE(E134:J134,2),0)+IFERROR(LARGE(E134:J134,3),0)

Hope that helps.
 
Upvote 0
Hi and thank you both for your quick and speedy reply. Much appreciated.

Schielrn I tried your solution and it worked perfectly, I've 2007 so I could use the shorter formula! I've never seen that formula before.

=(IFERROR(LARGE(E119:J119,1),0)+IFERROR(LARGE(E119:J119,2),0)+IFERROR(LARGE(E119:J119,3),0))

So thank you both very much.
 
Upvote 0
I was really impressed with sanrv1f's formula as I didn't even think of going that route.
 
Upvote 0
Another possibility which leverages on Sankar's answer:

Code:
=IF(COUNT(E134:J134)>3,SUM(LARGE(E134:J134,{1,2,3})),SUM(E134:J134))
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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