+ Reply to Thread
Results 1 to 5 of 5

Inserting Missing Dates and Times in a long Timeseries

  1. #1
    Registered User
    Join Date
    05-09-2013
    Location
    Vancouver, CA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Inserting Missing Dates and Times in a long Timeseries

    Hello all,
    I am in need of your expertise! (Please!) I am not proficient in VBA at all and need help inserting dates and times of day in a long timeseries dataset. Some dates are missing completely while others are missing certain times of day. I need both the date and corresponding hour inserted (all the times of day are in 1 hr intervals).

    Example:
    4/19/1992 12
    4/19/1992 13
    4/19/1992 14
    4/20/1992 0
    4/20/1992 1
    4/24/1992 22
    4/24/1992 23

    and so on....

    I have also attached the sample sheet if you need more info. Much much thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Inserting Missing Dates and Times in a long Timeseries

    like this?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-09-2013
    Location
    Vancouver, CA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Inserting Missing Dates and Times in a long Timeseries

    kalak: Thanks so much! Worked like a charm...except (and, yes, you can be frustrated), I need an empty row to be inserted with the addition of the missing date and time. I need this because there is data associated with the dates and times that need to remain with their respective rows.

    With my limited knowledge, I haven't been able to turn your code into an row insertion as well...help??

    Example:
    Date Time Data
    4/19/1992 12 2
    4/19/1992 13 3
    4/19/1992 14 2
    4/20/1992 0 1
    4/20/1992 1 5
    4/24/1992 22 7
    4/24/1992 23 2

    Again, I've attached a sample.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Inserting Missing Dates and Times in a long Timeseries

    does this do what you want? on your file data - not your posted sample data
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-09-2013
    Location
    Vancouver, CA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Wink Re: Inserting Missing Dates and Times in a long Timeseries

    Kalak--it worked! Thank you so much! I see your code and I see my question and I still can't figure out how it works, but that's why I suck at this and you don't. Very awesome--with hundreds of files that are years and years long, this is going to be a lifesaver!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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