+ Reply to Thread
Results 1 to 5 of 5

Formula to calculate the number of days between dates (month wise)

  1. #1
    Forum Contributor
    Join Date
    06-05-2014
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    155

    Formula to calculate the number of days between dates (month wise)

    Hello Team,

    Please help me to find the formula to calculate the number of days between dates (month wise)

    I have start date and End Date in two columns. For example, if the date range is for 8 months, i am trying to find a formula that can give me the number of days for each month with in that date range.

    Example : - if the date range is from 10th Jan to Mar 15, the result expected is Jan - 20 (Jan 10th to Jan 30th , Feb - 28, Mar - 15 (Mar 1st to Mar 15th), April - 0 .

    Attached is the sample file and i have updated the results manually (D2 to M2, D3 to M3, D4 to M4). i am looking for a formula that can bring the same results in these cells.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Formula to calculate the number of days between dates (month wise)

    Whenever you use dates in Excel, you should use actual date numbers instead of strings. I have updated D1:M1 to use dates instead of strings.

    The formula to use is

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


    and copy to the right and down. I have repeated your three rows to show the results vs. your manual numbers (which have several errors).
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,607

    Re: Formula to calculate the number of days between dates (month wise)

    Assuming the description is binding, while sample data is "loosy" - like 30 written in E3, E4 for May (31 days long) or H2 and H4 - august is also 31 days long but in H3 shall be 30, because end date (C3 is Aug 30th):
    Formula for D2 and copy down/right:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  4. #4
    Forum Contributor
    Join Date
    06-05-2014
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    155

    Re: Formula to calculate the number of days between dates (month wise)

    6StringJazzer,

    Thank you so much. Its working fine as expected.
    Last edited by jeffreybrown; 07-22-2019 at 12:53 PM. Reason: Please do not use full quotes!

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,607

    Re: Formula to calculate the number of days between dates (month wise)

    Glad to hear so, and thanks for marking thread SOLVED and for reputation point

+ 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 duration Month wise ( total days in to period wise )
    By abuharvey in forum Excel General
    Replies: 4
    Last Post: 10-16-2018, 07:33 AM
  2. [SOLVED] Need formula to calculate days in each month across multiple Start and End dates
    By Ochimus in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-25-2017, 04:19 PM
  3. 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
  4. [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
  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. Replies: 15
    Last Post: 06-03-2014, 02:08 PM
  7. [SOLVED] Formula needed to calculate working days in specified month between two dates
    By webfeet2 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-24-2013, 02:19 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