=SUMPRODUCT(--(1/ROW(INDIRECT(B1&":"&B2))))
--
HTH
Bob Phillips
"LAdekoya" wrote in message
...
Thanks Bob/Bernard. It's my fault - I should have explained that my
numbers
may also be fractions. In fact they are each the inverse of 1 through to
N.
So 1/1 +1/2 + 1/3.......1/N. I assumed the same formula could apply.
Neither of the formulas you provided seem to work in this scenario and I
get
a REF error. Can you help further? Not a math or excel bunny I am afraid,
so
the more explanation the better.
"Bob Phillips" wrote:
If is always 1,2,3....N you can use Gauss's solution
=IF(ISEVEN(A1),(A1/2)*(1+A1),INT(A1/2)*(A1)+A1)
where A1 holds N
otherwise use
=SUMPRODUCT(--(ROW(INDIRECT(A1&":"&A2))))
where A1 and A2 are first and last numbers
--
HTH
Bob Phillips
"LAdekoya" wrote in message
...
I am looking for a formula to which I can supply a number N and have
it
calculate 1+2+3+4.....+N. I realise that I can enter 1 to N in as many
cells
then use SUM but this won't do for what I need to achieve.
|