L
Larry Coon
I'm looking for a formula to do sums, but the "sigma"
kind of sum (iterating over a formula and summing the
results), not the SUM() function kind of sums (summing
over a range of cells). For example, if cell A1
contains the number of iterations, A2 contains some
constant, and my formula is 1 + $A$2 * (i - 1), where
i is the counter from 1 to $A$1, I want something like
the following pseudocode.
int sum = 0;
for (int i = 1; i <= $A$1; i++) {
sum = sum + (1 + $A$2 * (i - 1));
}
Does that make sense?
Thanks for any help.
kind of sum (iterating over a formula and summing the
results), not the SUM() function kind of sums (summing
over a range of cells). For example, if cell A1
contains the number of iterations, A2 contains some
constant, and my formula is 1 + $A$2 * (i - 1), where
i is the counter from 1 to $A$1, I want something like
the following pseudocode.
int sum = 0;
for (int i = 1; i <= $A$1; i++) {
sum = sum + (1 + $A$2 * (i - 1));
}
Does that make sense?
Thanks for any help.