+ Reply to Thread
Results 1 to 2 of 2

Grouping dates with gaps in them.

  1. #1
    Registered User
    Join Date
    10-10-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    1

    Grouping dates with gaps in them.

    Hi.

    I have a dataset that contains instances of staff holidays. However, depending on how each manager has put the holiday on the system, the row can show individual days for a holiday period or some show the date range. I am aiming to count each instance a member of staff has thus in the below example, there are only 3 instances however there are 5 rows. Is there a way to group dates that are in succession of each other to be able to count the number of instances for each staff member?

    Start Date | End Date | No of Days
    15/2/2019 | 15/2/2019 | 1
    16/2/2019 | 16/2/2019 | 1
    17/2/2019 | 17/2/2019 | 1
    19/2/2019 | 19/2/2019 | 1
    20/3/2019 | 24/3/2019 | 5

    Any help with this would be greatly appreciated.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Grouping dates with gaps in them.

    Try this:

    =SUMPRODUCT(--((A3:A10+1)<>A4:A11))

    It seems OK... but I'm not wholly convinced yet!!
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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] Fix Gaps in Dates
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-17-2018, 03:46 PM
  2. Two products on a Single date, Pivot date grouping through gaps
    By Rajendra_kodavaty in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-04-2016, 09:47 PM
  3. [SOLVED] Overlapping Dates, Gaps in Dates, Double Counting
    By arunkushvaha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2013, 11:15 PM
  4. [SOLVED] Identify gaps in dates within a range
    By leslieharris in forum Excel General
    Replies: 5
    Last Post: 08-12-2012, 02:01 AM
  5. Overlapping Dates, Gaps in Dates, Double Counting
    By sglxl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2012, 02:46 AM
  6. listing gaps in dates
    By shakes347 in forum Excel General
    Replies: 4
    Last Post: 09-10-2010, 06:16 PM
  7. Searching multiple dates for gaps
    By jegtar in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-20-2008, 06:09 PM

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