+ Reply to Thread
Results 1 to 4 of 4

Need formula to calucalte based on start month # and duration # of months

  1. #1
    Forum Contributor
    Join Date
    10-11-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    230

    Need formula to calucalte based on start month # and duration # of months

    I need a formula that will calucalte the monthly total based on the following conditions:
    Col A = Yearly Cost
    Col B = The number of the month when the costs are starting (1=Jan etc)
    Col C = The duration or the number of months for which the costs are to spread
    Col D is Year 2013 with the months across columns D-O. Row 1 above those columns shows the month's corresponding number.

    Right now I have =IF($B3<=D$1,$A3/$C3,0) however if my start month is 1 and my duration is 5, I need the costs to stop after May. I've attached a sample file. Thanks for the help.Calculate based on start month and duration.xlsx

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Need formula to calucalte based on start month # and duration # of months

    Try this, copied down and across...
    =IF(AND(MONTH(D$2)>=$B3,MONTH(D$2)<=$C3+$B3-1),$A3/$C3,0)

    If you dont want anything shown if the dxates are outside the range, use this instead...
    =IF(AND(MONTH(D$2)>=$B3,MONTH(D$2)<=$C3+$B3-1),$A3/$C3,"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    10-11-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Need formula to calucalte based on start month # and duration # of months

    Thank you so much! This absolutely does what I need. So much appreciated.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Need formula to calucalte based on start month # and duration # of months

    Happy to help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 10
    Last Post: 03-09-2019, 05:40 AM
  2. Formula for average duration for each month based on the ending month
    By bobby769 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-21-2013, 11:18 AM
  3. Calculating a minutes duration based on start and end date and times
    By chrispx001 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2013, 08:16 AM
  4. [SOLVED] formula or VBA - would like to autofill cells based on start date and # of months
    By jsr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2006, 11:00 AM
  5. Set an array on based on duration of months
    By Robog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2006, 06:35 PM

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