+ Reply to Thread
Results 1 to 11 of 11

Date challenge - transform effective date range to day time series

  1. #1
    Registered User
    Join Date
    03-01-2023
    Location
    London, England
    MS-Off Ver
    Excel for Mac, Excel 16.80, MS365
    Posts
    10

    Date challenge - transform effective date range to day time series

    Hi there,
    I have a date challenge, as attached for information. Date challenge - transform to time series.xlsx

    I’d taken a stab at this separately, breaking it down into several steps but even then, struggling to find a way to complete the task and I think there should be a way to combine it into either one step, or certainly fewer steps!
    I have a source data set which shows airline operations (flights) by day of week and an effective date range.

    I want to transform the data so that I have a list of the data by day time series. So, translating the day of operation and effective date range to show all flights operated on a daily basis. E.g. taking the first row, it only operates on day 5 (Friday) so return a row for each flight operated within the effective date range (e.g. from 16 April 2024, the first operation is 19 April, then 26 April and so on.

    Data set is thousands of rows so a short cut would save a lot of manual work.
    (lighter colours is just to show the additional rows that would be generated from the single original, source data row.)

    Many thanks as always for the expertise that is on this forum. It is really 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 2406
    Posts
    44,662

    Re: Date challenge - transform effective date range to day time series

    Whay does AB-352 stop in late April.... what about all the other dates?
    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

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,013

    Re: Date challenge - transform effective date range to day time series

    Is the input range in your sample as per your real file? If not, please post a file which represents the format of your real file, including where the output is to be placed (separate sheet from the input preferably).
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,013

    Re: Date challenge - transform effective date range to day time series

    @Glenn:Ii think the date range is 16/04/2024 to 29/10/2024 (Column E: 16.04-29.10).

    Sample given was illustration only!

  5. #5
    Registered User
    Join Date
    03-01-2023
    Location
    London, England
    MS-Off Ver
    Excel for Mac, Excel 16.80, MS365
    Posts
    10

    Re: Date challenge - transform effective date range to day time series

    Hi,
    Thanks for the replies.

    The sample is just for illustration (but is the format / layout of the source data) and the output rows only represent the first few values returned (both would carry on until their last occurence before or on the 'effective to' date).
    I've added an overall effective date range that covers the range of the source data and separated the source and desired output onto two sheets.

    Any help greatly appreciated!

    Date challenge - transform to time series2.xlsx

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,013

    Re: Date challenge - transform effective date range to day time series

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-01-2023
    Location
    London, England
    MS-Off Ver
    Excel for Mac, Excel 16.80, MS365
    Posts
    10

    Re: Date challenge - transform effective date range to day time series

    Hi there,

    JohnTopley, this is great thank you. Have to say I'm a novice when it comes to VB work so this is a nice learning point for me! Some of the output isn't in the correct format although I'm guessing that is just due to the formatting of the source data? e.g. Arrival time of 09:10 comes out as 45:74 (based on the numerical value of 9 Oct?) and elapsed time of 02-05 comes out as date format (5/2/2024).

    I'll mess around with it and see if I can get it to work cleanly.

    Thanks again,
    Mark.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,013

    Re: Date challenge - transform effective date range to day time series

    Either set dep/arr times as TEXT OR better, enter them as Excel time e.g 18:30, 07:40.

    Excel will treat 18-30 as a date
    Last edited by JohnTopley; 01-19-2024 at 02:15 PM.

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

    Re: Date challenge - transform effective date range to day time series

    I knew that there was a formula based solution... but I couldn't get it to work. This does work, and I add it mainly to show that I DID try. There is a provlem with the data in F4, which you have entered as a DATE, not as text. I changed it.

    VBA is probably a better route!

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Date challenge - transform effective date range to day time series

    Here is a shorter formula tha does the job:

    Please provide the ellapsed time in the Source data is TEXT and empty all epected results and try:

    Please Login or Register  to view this content.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2501 (Windows 11 24H2 64-bit)
    Posts
    89,058

    Re: Date challenge - transform effective date range to day time series

    Another option:

    Please Login or Register  to view this content.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] LOOKUP with condition + date within range challenge
    By RegisLR in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-30-2019, 01:43 PM
  2. [SOLVED] Converting Date Range to Date Series
    By rabbit_post in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-11-2019, 01:53 AM
  3. Find a date time range within start and stop date time?
    By Rodney Fernandes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-31-2017, 02:19 AM
  4. Replies: 3
    Last Post: 09-20-2016, 03:13 PM
  5. Calculate Effective Date based on Another Date Range
    By Alphabex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2015, 01:43 PM
  6. Popup box asking the effective date, so macro can delete any dates < entered date.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2013, 07:40 AM
  7. How to automate the date range when building Time-series charts in VBA
    By vbanewbie1233 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2012, 08:11 AM

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