Project Timeline - Macro or Formula

pcchan

New Member
Joined
Jan 13, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello, I work in the construction industry and I've created a schedule that tracks 8 separate task/deadlines for multiple projects (the task are the same for each project but the projects have different start dates.) The timeframe for each task will always remain the same with event A happening 1 day after the project start date, event B happening 3 days after project start and 2 days after event A, etc.

I started with an if/then formula but have since changed to a vlookup (=IFNA(VLOOKUP((I$5-$C18),Inputs!$A$1:$B$12,2,FALSE)," "). I would like to roll any task that occurs on a Saturday or Sunday to Monday and shift the remaining task one day. I can resolve some of my issue with a formula but realize a macro is probably more suited. Also, I would like to have input for skipping a day as needed (ie. holidays) and rolling to the next workday. I am currently using Workday.INTL to show only weekdays and manually manipulating the file to skip weekends. I do have some VBA experience but I have been far removed from it for over 10 years so I don't have the skill set anymore to write the macro. Thanks for any help.

Release DateMondayTuesdayWednesdayThursdayFridaySaturdaySundayMondayTuesdayWednesdayThursdayFridaySaturday
1/10/20221/11/20221/12/20221/13/20221/14/20221/15/20221/16/20221/17/20221/18/20221/19/20221/20/20221/21/20221/22/2022
1/9/2022​
Footer/FINSFormsPlumb SlabPINSCoverSINSPour Slab
1/10/2022​
Footer/FINSFormsPlumb SlabPINSCoverSINSPour Slab
1/11/2022​
Footer/FINSFormsPlumb SlabPINSCoverSINSPour Slab
1/12/2022​
Footer/FINSFormsPlumb SlabPINSCoverSINSPour Slab
1/13/2022​
Footer/FINSFormsPlumb SlabPINSCoverSINS
1/14/2022​
Footer/FINSFormsPlumb SlabPINSCover
1/16/2022​
Footer/FINSFormsPlumb SlabPINS
1/17/2022​
Footer/FINSFormsPlumb Slab
Cell Formulas
RangeFormula
H4H4=TEXT(WEEKDAY($B$1,1),"dddd")
I4I4=TEXT(WEEKDAY($B$1+1,1),"dddd")
J4J4=TEXT(WEEKDAY($B$1+2,1),"dddd")
K4K4=TEXT(WEEKDAY($B$1+3,1),"dddd")
L4L4=TEXT(WEEKDAY($B$1+4,1),"dddd")
M4M4=TEXT(WEEKDAY($B$1+5,1),"dddd")
N4N4=TEXT(WEEKDAY($B$1+6,1),"dddd")
O4O4=TEXT(WEEKDAY($B$1+7,1),"dddd")
P4P4=TEXT(WEEKDAY($B$1+8,1),"dddd")
Q4Q4=TEXT(WEEKDAY($B$1+9,1),"dddd")
R4R4=TEXT(WEEKDAY($B$1+10,1),"dddd")
S4S4=TEXT(WEEKDAY($B$1+11,1),"dddd")
T4T4=TEXT(WEEKDAY($B$1+12,1),"dddd")
H5H5=B1
I5:T5I5=H5+1
H6:T14H6=IFNA(VLOOKUP(H$5-$C6,Inputs!$A$1:$B$12,2,FALSE)," ")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H5:AL5Cell Value=$B$2textNO
H5:AL5Cell Value=$B$3textNO
H6:AL14Cell Valuecontains "PINS"textNO
H6:AL14Cell Valuecontains "SINS"textNO
H6:AL14Cell Valuecontains "Footer"textNO
H6:AL14Cell Valuecontains "Pour Foot"textNO
H6:AL14Cell Valuecontains "Flatwork"textNO
H6:AL14Cell Valuecontains "Pour Slab"textNO

Also, I originally started with an if formula to hide the task on weekends and holidays =IF(OR(H$4="Saturday",H$4="Sunday",H$5=$B$2,H$5=$B$3)," ",IFNA(VLOOKUP(H$5-$C27,Inputs!$A$1:$B$12,2,FALSE)," "))
 

Attachments

  • Picture1.png
    Picture1.png
    17.4 KB · Views: 9
  • Picture2.jpg
    Picture2.jpg
    127.8 KB · Views: 9

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,814
Messages
6,181,130
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top