Factorial

ctrnz

New Member
Joined
Nov 5, 2008
Messages
3
Excel has excellent built in function FACT() which does n! calculations.
But I don't need 1*2*3*4*5. Instead I need 1+2+3+4+5 calculation.
Excel has such built in function?

Thank You,
AK
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
One multiplication compared to one exponentation. Though, as people may have noticed I've never really been much into optimizing performance where none was needed. {grin}

More important, expandability. As Riaz pointed out n*(n+1)/2 can be easily extended to sum values from m to n with n*(n+1)/2 - (m-1)*m/2. On the other hand, (n+n^2)/2 would become (n+n^2)/2 - (m-1 + (m-1)^2)/2

Hello Tushar,

Why do you prefer that version? Is it more transparent....or is there something else?
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top