View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson
 
Posts: n/a
Default Factorial (like =FACT) function?

Tom,

I'm not entirely clear on what you want to do, but you can add
the numbers between 1 and N with the array formula

=SUM(ROW(INDIRECT("1:"&A1)))

where A1 contains N.

Since this is an array formula, you must press CTRL+SHIFT+ENTER
rather than just ENTER when you first entire the formula and
whenever you edit it later. If you do this correctly, Excel will
display the formula in curly braces {}.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message
...
A factorial expression, e.g. 5! is evaluated 5*4*3*2*1.

In Excel, this can be expressed as =FACT(5)

I want to do something similar, but a little different:
5+4+3+2+1

E.g. Year to date could be results for June + May + April +
March + February
+ January, where Month(TODAY) gives 06 as June and then simply
recalculates
the month sensitive formulas based on each month below this
number, returning
the total of all evaluations.

Ideally I'd like to manage this within a formula, without
resorting to VBA.
Any ideas?

Tom.

P.S. Many thanks for any attempts - regardless of whether they
solve my
problem!