Thetownend.com

80% => The Nevillew General Discussion Forum => Topic started by: jimmy_onions on Friday, October 19, 2012, 10:46:20



Title: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 10:46:20
For all you excel experts, another query which I would have thought would have been ridiculously straight forward, but excel seems to be coming up wanting....

Can you do a basic summation in excel, e.g. the sigma sign..sum of x from x=1 to x=n, where n varies...

e.g 1+2+3+4+.....n

would have thought this was trivial, but apparently not?


Title: Re: Another excel question
Post by: Samdy Gray on Friday, October 19, 2012, 10:47:31
Where are you getting 'n' from? A cell value?


Title: Re: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 10:47:52
yes


Title: Re: Another excel question
Post by: Samdy Gray on Friday, October 19, 2012, 10:52:22
And you want to add up all the numbers between 1 and n ?


Title: Re: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 10:55:01
yep


Title: Re: Another excel question
Post by: Samdy Gray on Friday, October 19, 2012, 10:55:43
Use =sum((a1*(a1+1))/2), substitute a1 for the range of the cell where 'n' is stored.


Title: Re: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 11:04:07
samdy gauss, I mean gray...thanks a lot, that does the trick....what is your mathemtical background that you can pluck out equations like that at a drop of a hat?

That works perfectly for me, however I am still curious if there is a more general summation expression  in excel which will work for the summation of any function, not just x,   x^2, 3x/2,  x^3/x etc etc..


Title: Re: Another excel question
Post by: Samdy Gray on Friday, October 19, 2012, 11:09:16
The basic equation for working out the sum of a 1 to n sequence is:

n(n+1)
   2

Basic GCSE maths.

You could probably use SERIESSUM (http://office.microsoft.com/en-gb/excel-help/seriessum-HP005209253.aspx) but that's more for when it's not exactly a simple series.


Title: Re: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 11:10:56
I did my gcse over 20 years ago...long since forgotten...cheers anyway.