+ Reply to Thread
Results 1 to 4 of 4

Months between dates

  1. #1
    Registered User
    Join Date
    07-29-2016
    Location
    Belfast
    MS-Off Ver
    2013
    Posts
    2

    Months between dates

    Hi

    I have a report that shows entries for employees and corresponding start/end dates. The number of rows per employee is variable.

    I am trying to find out where dates are continuous for each employee across all rows for that employee and if they are continuous, then I want to see the number of months between those continuous dates.

    For example: in the attached fiile, the first row end date is 31/7/22 , the second row start date for that employee is 01/2/23, so that is not a continuous date range, so I would not want to see the number of months between that date range. However, the start date for that employee in row 3 is 01/01/24, this is a continuation from the end date in row 2 for that employee, and their end date in row 3 is 31/03/24. So I would want to see an indicator that shows "Continuous" and a calculation of how many months there are between those continuous dates. Eg from 01/01/23 to 31/03/24 in this example it would be 14 months.

    Appreciate any help that you can provide

    Will
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,505

    Re: Months between dates

    Please try this in F2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,301

    Re: Months between dates

    You have a problem in that some of your 'dates' are text. I have changed formatting to General: those that show as 5-digit serial numbers are dates, the rest are text.

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    D
    E
    1
    Start Date
    End Date
    2
    44774
    31/07/2022
    3
    44928
    31/12/2023
    4
    45292
    31/03/2024
    5
    44565
    31/12/2022
    6
    44927
    31/05/2023
    7
    44932
    31/05/2024
    8
    42747
    30/11/2018
    9
    13/09/2021
    44743
    10
    44569
    31/12/2022
    11
    44927
    31/01/2023
    Sheet: Sheet1
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Months between dates

    In G2 copied down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Adding months to date dependent on months between dates
    By Smiffy3594 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-06-2023, 05:04 AM
  3. [SOLVED] VBA code to filter pivot table by rows containing dates for dates < 60 months old
    By BrokenDome in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2019, 01:28 PM
  4. 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
  5. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  6. 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
  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