+ Reply to Thread
Results 1 to 5 of 5

listing gaps in dates

  1. #1
    Registered User
    Join Date
    07-12-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    22

    listing gaps in dates

    Hey all,

    I have a list of dates that has some gaps. I want a formula to look through these dates and then list the number of days in the gaps if the gap is greater than 35 days.

    I have attached an example.

    Thanks,

    Shakes
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-12-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: listing gaps in dates

    Any thoughts?

    Thanks,

    Shakes

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: listing gaps in dates

    There's a "key" column added to examine each range. You can hide that column if you wish.

    The formula in D1 is an array formula, any changes must be confirmed with Control-Shift-Enter to keep the array active. Then copy the cell downward.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    07-12-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: listing gaps in dates

    This looks perfect, but when I when I try to adapt the code to another project I can't get it to work.


    I have attached that project. I am trying to list the gaps in the dates that appear in Row O.

    Your help is appreciated!
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: listing gaps in dates

    1) The formula in P22, then copied down:

    =IF(O22="",0,O22-LOOKUP(99^99,$O$21:$O21))

    2) The array entered formula in Q22 is:

    =INDEX($P$1:$P$36, SMALL(IF($P$1:$P$36>35, ROW($P$1:$P$36), ""), ROW(A1)))

    You had not used CTRL-SHIFT-ENTER to enter your incorrect version, so be sure to enter these properly to get the first array answer to appear. Then copy it down.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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