+ Reply to Thread
Results 1 to 7 of 7

Calcukate no of months between dates

  1. #1
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Calcukate no of months between dates

    Hey guys,

    I am stuck with a simple problem.

    I need to get the total number of months between 2 dates.

    I have attached my sample file.

    I need to substract Range "E" and "N".


    So far, I got

    * number of years in Range "R"
    * number of months in range "S"
    * number of days in range "T"

    I have added range "R" and "S" to get total number of months in range "AC"


    However i am stuck with the days .



    If the number of days (Range "T") is above 2 and equal to less than 17 then it must be considered half month
    If the number of days (Range "T") is equal to greater than 18 than it must be considered 1 month


    Thus,
    for example
    if number of days is 2, then its 0 months
    if its 6 days then i consider it half month (0.5 month)
    if its 19 days then i consider it 1 month



    Anyone can help me please?

    Its basically for calculating interest on morgages

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Calcukate no of months between dates

    One way

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

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Calcukate no of months between dates

    hey Richard,

    this works great for me.

    thank you.


    Also is there anyway to consider febuary month as 30 days ?

    I want to consider all months as 30 days.

    Is it possible to consider all the months as 30 days?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Calcukate no of months between dates

    How does limiting any month to 30 days change the cut off for showing either 0, 0.5 or 1 month?

    What's the essence of the task here and how do you use the number you obtain? Would it not be simpler to calculate the exact decimal of a month? e.g. 50.2, 50.7, 50.9...whatever...

  5. #5
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Calcukate no of months between dates

    i charge customer interest on the basis of number of months.

    if its below 18 days then i consider as half month and if above or equal to 18 days then 1 month.


    So here is an example:

    *Through the formulae which you provided me:

    suppose a person morgages his gold to me on 23.02.2018 and comes to withdraw it on 11.03.2018

    through your formulae i get it as 16 days ( which is half month)


    * through considering all month as 30 days

    Now same morgage would give me different result as I am considering all months as 30 days.

    Through my way i get 18 days ( 24,25,26,27,28,29,30,1,2,3,4,5,6,7,8,9,10,11)


    Through your formulae its 16 days (half month) and through mine its 18 days ( which is 1 month)


    this is the problem which i am facing.

    how do i deal with this??

    please help me

  6. #6
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Calcukate no of months between dates

    hey richard,

    i have worked out on this.

    I used days360 function to get this.

    i have attached the sample file.

    range "q" is the number of months

    range "t" is the number of days .


    All i need is this :

    If the number of days (Range "T") is above 2 and equal to less than 17 then it must be considered half month
    If the number of days (Range "T") is equal to greater than 18 than it must be considered 1 month


    could you please help me?

    is it possible to edit the formulae which you provided to me earlier and use?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Calcukate no of months between dates

    The only file that I see is the file attached to post #1 so I will have to guess that the file you refer to in post #6 is set up as shown in that file.
    To yield a number of 30 day months, I guess that your formula in column Q is: =TRUNC(DAYS360(N1,E1,0)/30)
    To meet the requirements stated in post #6, I suggest that you modify that to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Conditional Format - Dates greater than 18 months and 24 months
    By amandavan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2024, 04:08 PM
  2. Count how many dates are this month, 2 months and 3 months old
    By jimmisavage in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2017, 09:21 AM
  3. [SOLVED] Populate Dates in Other Months Based on Jan Dates
    By catnam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2015, 08:52 AM
  4. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  5. Number of months (elapsed months) between two dates
    By Timbite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2012, 11:37 AM
  6. Months in the given dates
    By corinereyes in forum Excel General
    Replies: 3
    Last Post: 03-18-2009, 07:45 AM
  7. Adding months to dates should account for 28-30-31 day months
    By Graham in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2006, 08:10 AM

Tags for this Thread

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