You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Michael Jiang <it...@gmail.com> on 2011/07/21 22:07:59 UTC

Excel formula

need to sum up over 100 products: sum(A1*B1, A2*B2, ..., A100*B100). A
formula like this should work, but it is awkward to write 100 product inside
sum() in code. Is there a simple way to achieve the same calculation? A
range or sth? Thanks!

--Michael

Re: Excel formula

Posted by japa <ja...@optusnet.com.au>.
Solved, use SUMPRODUCT. But still want to ask a generic question, in case
the elements in sum() is not a product, is there a way to specify a range to
do that. e.g. sum(A1*B1+C1, A2*B2+C2, ..., A100*B100+C100)? what is the
shortest formula for this? Thanks!

sumproduct(A1:A100,B1:B100) + sum(C1:C100)

should do it

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Excel-formula-tp4620810p4625084.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Excel formula

Posted by Michael Jiang <it...@gmail.com>.
Solved, use SUMPRODUCT. But still want to ask a generic question, in case
the elements in sum() is not a product, is there a way to specify a range to
do that. e.g. sum(A1*B1+C1, A2*B2+C2, ..., A100*B100+C100)? what is the
shortest formula for this? Thanks!

On Thu, Jul 21, 2011 at 1:07 PM, Michael Jiang <it...@gmail.com> wrote:

> need to sum up over 100 products: sum(A1*B1, A2*B2, ..., A100*B100). A
> formula like this should work, but it is awkward to write 100 product inside
> sum() in code. Is there a simple way to achieve the same calculation? A
> range or sth? Thanks!
>
> --Michael
>