简体   繁体   中英

Sum 1 to n Libre Office

there is a way (in open office calc) to have in a cell the result of the sum from 1 to N where N is the value of another cell?

I tryed to use Sum but this is not the thing i need!

You may use the formula n * (n+1) / 2.

https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_

The function sum is summing up the contents of cells, you may use sum if you have an array of n cells containing 1, 2, 3, ... n.

You may also write a macro / functions that does the sum.

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