+ Reply to Thread
Results 1 to 5 of 5

Formula Coding for Factorials

Hybrid View

  1. #1
    Registered User
    Join Date
    11-12-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    10

    Formula Coding for Factorials

    I need to write a formula or a function that divides all the numbers from the previous year without having to input it manually.
    For example,
    Year 1 1 20
    Year 2 2 30
    Year 3 3 40
    Year 4 4 50

    So I need 20/1 , 30/(1*2), 40/(1*2*3), 50/(1*2*3*4).

    I have about 400 cells that I need to do so I can't input it manually. Is there a function i can use to solve this problem.

    For those that know finance, I am try to discount cash flows where each year has a different interest.

    Thanks for any help.
    Last edited by alouie457; 11-12-2009 at 06:45 PM.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Need help on forumula coding

    In D1, =C1/Fact(B1) and drag down. That will work if B1 increases by one each row.

    If it will change, then put =C1/B1 in D1, and then =C2/(C1/D1*B2) in D2 and drag down as needed.
    Last edited by darkyam; 11-12-2009 at 06:25 PM.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Need help on forumula coding

    Welcome to the forum, alouie.

    Please take a few minutes to read the forum rules, and then amend your thread title accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    11-12-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Need help on forumula coding

    Hi, thanks for the help.

    I have one more question.

    When I use the fact function, it keeps on rounding my numbers to 1 for some reason.

    1.004 1
    1.002 1*1
    1.003 1*1*1

    How can I get it to stop that?

    Once again, thanks.

  5. #5
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Formula Coding for Factorials

    If you're using decimal places, I would suggest using the other formula. It will also work for factorials.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1