Feb 21 2023 12:47 PM
In this sheet, I would like to have a date timeline generated from 6 inputs:
1- start date ( where timeline should starts )
2- end date ( where timeline should ends )
3- data presenting type (days, weeks or months)
4- weekend type to be excluded from timeline ( Friday & Saturday, Saturday & Sunday or No Days off)
5- weekend days that would be included in timeline ( due to overtime for example )
6- vacations should be excluded from timeline ( if same date is in vacation table & weekend days to include in timeline table, dates should be included in timeline.
I tried achieving this through "if" function, but I couldn't, it goes messy! I only succeed in generating days timeline as shown in the image! is it possible to achieve that in excel 2016?
Feb 21 2023 01:17 PM
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
And what do you want to do with the data presenting type (days, weeks or months)?
Feb 22 2023 03:26 AM
Dear Mr. Hans, thank you for your respond,
for the presenting data type, I meant that, if I choose "Days", time line would appear as days dates, if I choose "Weeks", timeline should appear as "week 1 of the month", Week 2of the month" and so on.
I attached an example file to demonstrate the problem through this link:
https://drive.google.com/drive/folders/1GUut_8RTvaw0miPbSU-7oI_o1u8tz0sf?usp=sharing
Feb 22 2023 04:41 AM
How should we treat weekend dates, vacation dates and dates to include if the timeline should display weeks?
And how if the timeline should display months?
Feb 22 2023 10:36 AM
Feb 22 2023 11:54 AM
I'll see if I can come up with something, but it's complicated.
Feb 22 2023 12:15 PM
Feb 22 2023 07:40 PM
Feb 23 2023 06:21 AM
The code in the attached workbook could be optimized, but please check whether it does what you want.
Feb 23 2023 02:18 PM
Feb 23 2023 02:36 PM - edited Feb 23 2023 02:37 PM
Sure, go ahead.
If you use it commercially, it would be nice if you mention somewhere in the workbook that you got help from Microsoft Tech Community.
Feb 24 2023 06:49 AM
Feb 24 2023 07:04 AM
The workbook contains a VBA macro. It will only work in the desktop versions of Excel for Windows and Mac, not in Excel Online (on the web), nor on Android and iOS.