简体   繁体   中英

Can I use formula as a SUM argument

Let's I have values on columns A and B from row 1 to 4. I want to sum the results of the multiplication An*Bn, like this:

=A1*B1+A2*B2+A3*B3+...+An*Bn

Since my index n is too great I was wondering whether there's an easier way to get this sum done, something like this:

=SUM((A1*B1):(A1000*B1000)

Can anyone help me?

Thanks, Vandre

My answer to this would be to create a third column that does the multiplication:

C1's Forumula: =A1*B1

Then copy the C1 forumla down the entire C column.

Then SUM C: =SUM(C:C) or =SUM(C1:C1000)

May be you can try this:

=SUMPRODUCT(A1:A1000,B1:B1000)

This formula sums all the product values from a1 to a1000 and b1 to b1000

Hope it will help for your idea.

Try

=SUMPRODUCT(A1:A4;B1:B4)

A   B   C=(A*B)
1   1   1
2   2   4
3   3   9
4   4   16
        30  sum of C1:C4

30  =SUMPRODUCT(A1:A4;B1:B4)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM