Formula Help - Squaring three highest numbers

G

Guest

I have a form that has six areas where a number of 1 - 6 will be entered.

I need a formula that will square the 3 highest numbers and and add the
three together -

Example -
1
2
4
4
5

The numbers 4 and 5 will be squared and added together for a total of 57
 
B

Bob Phillips

=SUMPRODUCT(LARGE(A1:A5,ROW(INDIRECT("1:3")))^2)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

In your example, wouldn't the two 4's and the 6 be the largest 3 values...not
just one 4 and the 6?

If that's true, try this formula:
=SUMPRODUCT(LARGE(A1:A5,{1,2,3})^2)

With the numbers 1,2,4,4,6 that formula returns
=6^2 + 4^2 + 4^2
=36+16+16
=68

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
G

Guest

Retraction of my comment....
I had typed a 6 instead of a 5 as the last digit.
Using your actual values of 1,2,4,4, and 5, of course the result would be 57.

My apologies

***********
Regards,
Ron

XL2002, WinXP
 
G

Guest

I just found out that if the sum is greater than 75 I need for it to be 75.

So - if the sum comes out to be 82 then I need 75 for the answer.

Thanks.
 
G

Guest

Try this:

=MIN(SUMPRODUCT(LARGE(A1:A5,{1,2,3})^2),75)

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
G

Guest

=MIN(75,SUMPRODUCT(LARGE(A1:A6,{1,2,3})^2))


Denise said:
I just found out that if the sum is greater than 75 I need for it to be 75.

So - if the sum comes out to be 82 then I need 75 for the answer.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top