First time here? Check out the FAQ!
I apologize if this question is pretty straightforward and possibly common knowledge, but I've been trying to google it in as many permutations of the question as my brain can allow, and I have not seen a single straightforward answer to this. The only real reference of LibreOffice even having an actual summation (not sum) feature is in Math, which is strictly notation.
Let me kindly clarify my question: I am not asking whether there is a SUM function (that is definitely common knowledge); I am asking whether or not there is a SUMMATION function (i.e. sum [expression] from i=a to b) in Calc.
If there is, kindly refer me to the correct formula/documentation of the function. If not, well... bummer. I'm having trouble finding this function in Excel as well, but a colleague mentioned it did have this, which is called through ADDSUM() or something. I wouldn't know; I'm a faithful user of Calc.
Edit: I suppose my question is still a little vague, or at least the details of what I'm trying to look for, so I'll make an example with a hypothetical function I'll call SUMM(). This function would receive 4 arguments, which is the same number of terms you need to input in the summation formula in Math.
Regarding the arguments. First, there would be the expression to be used, for example "5+6*i", where i is the variable you'll use to define your range. Second would be the letter you used in your expression, in this case "i". The third and fourth arguments would receive the lower and upper bounds of the range of values of i, respectively.
The format of the hypothetical function would look something like SUMM(expression,variable,lower_bound,upper_bound). It could link to other cells for certain values or references of the expression, but can also calculate a value without any references, given you supplied it with the proper information.
I hope I made my question clearer.
answered 2012-03-16 16:07:29 +0200TJ Meneses
Based on my original question, and after doing a bit more research, it's become painfully obvious that LibreOffice Calc simply does not have a function for summations. There is no single function, or even combination of functions, that will calculate the sum of an expression f(x) from x=a to b (there are workarounds, but all techniques I've heard from others are array-based, not single-cell solutions).
The interesting thing is that my calculator has this pretty basic function, and the syntax and logic isn't even that difficult to implement. I suppose there just aren't enough people asking for an implementation of this function.
I'm still trying to implement it myself through the Basic programming language, but I'm also having a bit of trouble finding documentation for it. Maybe when I have free time, I'll decide to learn how to create an extension for it so other people might be able to use it.
answered 2012-03-06 23:03:15 +0200mariosv
Maybe: Menu/Data/MultipleOperations can help. See in the help how it works. To access the menu entry first select a range.
There is SUMIF(range; criteria; sum_range) function in Calc, which "Adds the cells specified by a given criteria. The search supports regular expressions. Range is the range to which the criteria are to be applied. Criteria is the cell in which the search criterion is shown, or the search criterion itself. Sum_range is the range from which values are summed; if it has not been indicated, the values found in the Range are med.". Information about all Calc function you can find here (Appendix B - Calc Functions). I hope this information will be helpful for you.
answered 2012-03-03 00:49:21 +0200mariosv
Maybe it is possible to do with an array expression, but with a more detailed explanation about what to do, would be easier to find a solution.
answered 2012-09-08 05:48:36 +0200momothefiddler
This requires the Eval() function from here, but this seems to work fine:
Function SUMMATION(lowerbound, upperbound, variable, formula) SUMMATION=0 FOR i=lowerbound to upperbound this=join(split(formula, variable), i) SUMMATION=SUMMATION+EVAL(this) NEXT i End Function
answered 2012-03-06 10:57:44 +0200yecril71pl
Sum of (5 + 6 i), where (i) ranges from (0) to (N), will be (N (3 N + 8) + 5). Pretty straightforward.
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-03-03 00:30:52 +0200
Seen: 971 times
Last updated: Sep 08 '12