+ Reply to Thread
Results 1 to 4 of 4

Calculate cost based on number of days within a period

  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    41

    Calculate cost based on number of days within a period

    Hello,

    I was hoping someone could help me. I have inherited a spreadsheet that has some IF arguments that don't seem to be calculating correctly. It seems that it is using the total amount of days in the date period instead of how many days in each specific month fall within the date period.

    This is the formula used =IF(S$1<$B26,0,IF(($E26-S$1+$B26)*$F26<0,0,($E26-S$1+$B26)*$F26))

    The formulas in S11:AD38 (highlighted in yellow) should calculate how many days between the specific dates for that row which appear in columns B & C fall into the specific month. Then it should multiply the number of days from the date period that fall within that month by the cost per day in column F.

    For example the latest entry in row 26 is showing the July cost as $6,783. This should in fact be $275.28 as there are 31 days in July and all 31 days of July fall within the column B & C dates for that row of 18/5/2018 - 1/9/2020. So the formula in this instance should be calculating 31 days X $8.88.

    This calculation should apply per row dependent on how many days of each date range fall into each month in S11:AD38, calculating by whatever Cost per day figure appears for that corresponding date range/row.

    Thanks
    Rooboyz
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Calculate cost based on number of days within a period

    Try this in S11:AD38
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This returned $275.23 in July row 26 at my end which I believe is correct.
    Last edited by FlameRetired; 08-07-2018 at 12:17 AM.
    Dave

  3. #3
    Registered User
    Join Date
    10-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Calculate cost based on number of days within a period

    Thanks so much Dave that is fantastic! Lifesaver.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Calculate cost based on number of days within a period

    You're welcome. Glad to help. Thanks for the feedback and added rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Calculate the portion of a planned number during a period, based on another time period
    By BryGuy81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2017, 01:29 PM
  2. [SOLVED] calculate total number of days between two days based on 365 days year
    By aparunkumar in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-14-2016, 12:51 AM
  3. Formula that identifies best rate and cost based on number of days
    By madrick1991 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-09-2015, 07:18 AM
  4. Replies: 0
    Last Post: 06-11-2015, 03:12 AM
  5. Calculate the number of working days month wise in a given period using VBA
    By rakesh3235 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-21-2014, 07:00 AM
  6. [SOLVED] Determining Cost Period based upon number of Tags in a 6 Month Range
    By sandmn321 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2012, 07:36 PM
  7. Replies: 8
    Last Post: 02-23-2005, 06:58 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