+ Reply to Thread
Results 1 to 9 of 9

How to calculate and return exact number of days in a month based on criterias

  1. #1
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    How to calculate and return exact number of days in a month based on criterias

    Hi,

    I am creating a spreadsheet for my depreciation schedule and I'm having problems on calculating the depreciation expense base on the number of days in a month.

    Depreciation expense is calculated as =Opening WDV*Dep.Rate*(No.of days in the reporting month/365) since i'm calculating and reporting on a per month basis.

    Under cell E2 of Sheet 1, I am to change the month on a monthly basis depending on which prior month I am working on. So in this case, I am to calculate expense for the month of Feb 2018. Please note that I need to calculate base on the exact number of days in a month.

    Basically I need a formula under column K of Sheet 2 wherein,

    1. If I acquire an asset on the same reporting month, and it is a day other than the first day of the month, then my formula in cell column K should be able to calculate base on the remaining days from the date the asset was acquired until the last day of that month. For example, the furniture. the number of days should be from 16/02/2018-28/02/2018.
    2. If the asset is being depreciated over the course of the year on a normal basis, then it should just calculate base on the number of days for that month. Ex. Container - 01 Feb 2018 - 28 Feb 2018
    3. If an asset is on it's last term, say in here for example, Tel Equipment was acquired on 20/02/2013, and it has a life of 5 years. on Feb 2018, it is supposed to be fully depreciated, thus, the number of days should only be from 01 Feb 2018 to 20 Feb 2018.

    I hope this makes sense and I really hope someone could really help.
    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 2403
    Posts
    13,406

    Re: How to calculate and return exact number of days in a month based on criterias

    Try this in K6 and fill down. This is done with the understanding that the 1st of the reporting month is in J5 and the last in K5.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  3. #3
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to calculate and return exact number of days in a month based on criterias

    Quote Originally Posted by FlameRetired View Post
    Try this in K6 and fill down. This is done with the understanding that the 1st of the reporting month is in J5 and the last in K5.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    wow this is great! I have a little problem though, I did a check to see if the expense will give the correct results, and it does except for when I am doing the last month in which the asset is fully depreciated. It returns a bigger amount. Please see Sheet 3. The amount should be just for $42.19 instead of $54.25 as returned by the formula,
    Attached Files Attached Files

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

    Re: How to calculate and return exact number of days in a month based on criterias

    Hmm. It appears the problem lies in the "precision" of EDATE.
    An oversight on my part. My apologies. I need to rethink that formula.

    If you care to try it yourself apply EDATE(A1,1) with 1/29/2019, or 1/30/2019 or 1/31/2019 in A1. They all return 2/28/2019. Other problems may lurk.

    I will be away for most of the weekend and will rework this as time permits.

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

    Re: How to calculate and return exact number of days in a month based on criterias

    This is working so far.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 05-14-2018 at 10:38 PM.

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

    Re: How to calculate and return exact number of days in a month based on criterias

    There is a small "glitch" in that previous formula. If you enter 2/1/2016 as the acquisition date and 2/1//2021 - 2/28/2021 to calculate that month it will return -12.05.

    This remedies that.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to calculate and return exact number of days in a month based on criterias

    So the max formula, it's supposed to force the final depreciation to give an amount which is not in excess of the acquisition value?
    This is really really helpful. Thank you so so much for the time and effort. God bless you!

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

    Re: How to calculate and return exact number of days in a month based on criterias

    A problem reveals when the dates spans two "leap days". There may be others.

    In those cases the depreciation depletes just before the end of the previous month. Using EDATE is not appropriate. That would state that procurement date of 2/1/2016 would depreciate through 2/1//2021 ... 1828 days. It doesn't. It depreciates out at 1/29/2021 or 1825 days.

    I must confess I did not see this one coming.

    These formulas will need some more work.

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

    Re: How to calculate and return exact number of days in a month based on criterias

    Here is the revised formula. It uses a cut-off date 1825 days from acquisition inclusive and MAX is no longer needed.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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 number of days in a month through 'Month Name'
    By pipsmultan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-30-2017, 03:10 PM
  2. Replies: 8
    Last Post: 07-22-2016, 02:52 AM
  3. [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
  4. How to calculate number of days between two dates by month
    By MHayward in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2015, 12:26 PM
  5. Replies: 2
    Last Post: 09-12-2014, 02:21 PM
  6. [SOLVED] Calculate number of days in a month between two dates
    By schlomo87 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-04-2014, 12:32 AM
  7. [SOLVED] Return Column Number Based on Two Criterias
    By taccoo73 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-14-2014, 02:51 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