+ Reply to Thread
Results 1 to 3 of 3

Expand List Based on Duration

  1. #1
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Expand List Based on Duration

    I've got a unique data set that needs to get expanded based on a duration listed in the data set. My data has Year, Month, Day, Start Hour, & Duration Days all listed in separate columns. Given the duration days I need to add all missing hours to my data set. However, duration days is not obvious. The first day is assumed to be from the start Hour to hour 24. If the start hour where 23, then I would need to add data for hour 24 only and that would be 1 day. Here is an example of what i'm after.... looking at row 2 the data says Jan 27, 2010 hour 12 with a duration of 2 days. So I need to add hours 13-24 for the 27th (that's 1 day), and hours 1-24 for the 28th (that's the 2nd day) to my data set. Is it possible to automate that?? Ideally a macro would create a new list with all original hours plus all additional hours.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Expand List Based on Duration

    Not exactly sure what you are doing,
    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: Expand List Based on Duration

    I was actually trying to create all the entries. I started messing around with some loops and think I figured it out. It took me awhile, but I think i learned something. This code I created seems to work great.

    Please Login or Register  to view this content.

+ 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