Sigma or Summation function in Excel

2020-07-13 07:52发布

Given a value (in a cell), calculate a formula like this:

Ʃ(3i+1) for i from 0 to the value specified in the cell.

SUM(), SERIESSUM() are not suitable in this case. How can I do this in Excel? Much thanks!

标签: excel
5条回答
干净又极端
2楼-- · 2020-07-13 08:01

[To complement Dirk Reichel's answer (I added a $ at "ROW(A$1)":

"=SUMPRODUCT(3*(ROW(A$1:INDEX(A:A,B1-A1+1))-(1-A1))+1)"

Here is what it looks like. (see the image)

No indirect, no array, and can be cut past anywhere. (Needed the $ sign to be cut and past anywhere)]

Image

查看更多
Evening l夕情丶
3楼-- · 2020-07-13 08:05

Use the array formula:

=SUM(3*ROW(INDIRECT("1:" & A1))+1)+1

enter image description here

Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.

查看更多
来,给爷笑一个
4楼-- · 2020-07-13 08:08

To leave you all options, just use this:

=SUMPRODUCT(3*(ROW(A1:INDEX(A:A,B1-A1+1))-(1-A1))+1)

A1 is the lower limit and B1 is the upper limit... will also work for ranges like i = -5 to -3 ;)

查看更多
祖国的老花朵
5楼-- · 2020-07-13 08:15

What about

=(3/2*n+1)*(n+1)

for 0 as lower bound and n is your upper bound

查看更多
别忘想泡老子
6楼-- · 2020-07-13 08:23

Demo as below graph:

Write in B2 Cell with =SUM(3*(ROW(INDIRECT(CONCATENATE("1:",A2+1)))-1)+1) then press Ctrl + Shift + Enter.

enter image description here

查看更多
登录 后发表回答