+ Reply to Thread
Results 1 to 10 of 10

Fix Gaps in Dates

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Fix Gaps in Dates

    Hello,

    I have the attached report which shows begin and end dates in column I and J however there are gaps in dates when you look at the lines for the same person (DBA column) in the rows below. I am trying to see if there is a quick way to have a macro insert a line between each row that has a gap and fixing the gap issue with the new row. It would also have to do this by Co in column A so that when the Co changes the macro starts fresh with the date gap test. Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Fix Gaps in Dates

    Hi
    Your attached file does not display what the data should look like after a macro

    From you explanation it is not very clear

  3. #3
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Fix Gaps in Dates

    Sorry. An example would be inserting a row between row 2 and 3 where all of the cells are duplicated with exception of the begin and end dates in column I and J where I would be 12/2/2017 and J would be through 4/29/2018.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Fix Gaps in Dates

    How about just changing column J to 4/29/2018??
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Fix Gaps in Dates

    unfortunately that is not an option for what is needed. I need the existing lines to remain unchanged and add additional lines to resolve the gap issues.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Fix Gaps in Dates

    Try this:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Fix Gaps in Dates

    That is working however the begin date on the new line needs to be the day after the end date on the previous line and the gross amount in column N on the new line needs to be zero. Is that an easy modification? Thanks so much. It worked in seconds too.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Fix Gaps in Dates

    Program modified:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Fix Gaps in Dates

    you are the bomb xladept. Thanks so much. It worked like a charm.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Fix Gaps in Dates

    You're welcome and thanks for the rep!

+ 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. Is it possible to create a spreadsheet that shows gaps between certain dates?
    By garry.inglesant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2017, 08:03 AM
  2. Fill in missing gaps in dates
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2013, 10:43 AM
  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