Function question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to take a number and then do a sum similiar to a factorial.

Example:

In cell A1 I input 5

then in cell A2 the function adds 5+4+3+2+1

if I put in 3 it adds 3+2+1

is there a function that does this?
 
Tim said:
I want to take a number and then do a sum similiar to a factorial.
Example:
In cell A1 I input 5
then in cell A2 the function adds 5+4+3+2+1
if I put in 3 it adds 3+2+1
is there a function that does this?

Function? I don't know. But there is a well-known formula
for this sum. In Excel, it would be:

=A1*(A1+1)/2
 
=a1*(a1+1)/2

It's a neat formula that some kid figured out a long time ago...

Say you want to add 1+2+3+4+5+6+...+100
Call that Sum S

We can write it two ways:
S = 1 + 2 + 3 + ... + 100
S = 100 + 99 + 98 + ... + 1

We add those two lines and we get:

2*S = 101 + 101 + 101 + ... + 101 (100 times)
so
2*S = 100 * 101

S = 100 * 101 / 2

Replace that 100 with an arbitrary N:

S = N*(N+1)/2
 
=SUMPRODUCT(--(ROW(INDIRECT("1:"&A1))))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
The kid was Issac Newton. The story is that as punishment the teacher told
the whole class to add up the numbers from 1 to 100. Newton stared at it a
bit and just wrote down the answer. You can imagine the teacher's
response.

Bill
--------------------
 
I think it was Carl Friedrich Gauss, actually.

Bill said:
The kid was Issac Newton. The story is that as punishment the teacher told
the whole class to add up the numbers from 1 to 100. Newton stared at it a
bit and just wrote down the answer. You can imagine the teacher's
response.

Bill
 
Even though the link has Newton in its address, it still refers to Gauss <vbg>.
 
You're absolutely right! Somehow I've apparently had that wrong for 30
years. Makes me wonder what else I "know that isn't true?

Thanks.

Bill
-----------------------
 
It gets worse, Bill........believe me........<g>

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top