Thetownend.com

80% => The Nevillew General Discussion Forum => Topic started by: jimmy_onions on Friday, October 19, 2012, 12:03:08



Title: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 12:03:08
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, 12:04:19
Where are you getting 'n' from? A cell value?


Title: Re: Another excel question
Post by: jimmy_onions on Friday, October 19, 2012, 12:04:40
yes


Title: Re: Another excel question
Post by: Samdy Gray on Friday, October 19, 2012, 12:09:10
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, 12:11:49
yep


Title: Re: Another excel question
Post by: Samdy Gray on Friday, October 19, 2012, 12:12:31
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, 12:20:55
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, 12:26:04
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, 12:27:44
I did my gcse over 20 years ago...long since forgotten...cheers anyway.