Forum Discussion
Dynamic schedule calender populated by spreadsheet
I'm not sure where to start on this, help would be appreciated.
I want to create a calendar to schedule jobs based on how long they take.
Current doc is a list which has the Name in Column B, and the run time in minutes in Column Q.
My calendar is 5 hour / 300 mins, 3x days a week. If a job is longer than 1 day worth, it should flow over to the next day.
See image for an example - this is just manually entered no formulas.
Ideally this can just keep going infinitely as more rows are added to the initial spreadsheet. Bonus if the calendar can colour code like above and if the calendar could populate dates, but not necessary if too difficult. A gantt chart style would also work if that's easier.
1 Reply
- smylbugti222gmailcomIron Contributor
Creating a calendar in Excel to schedule jobs based on their runtime can be tricky, but I can certainly help you get started and walk you through the process. Here's how we can approach it in two ways:
1. Excel Formulas and Formatting:
Step 1: Create the calendar layout: Start by setting up a table on a new sheet with columns for dates and job names.
You can set a fixed schedule for 3 days in a week (e.g., Monday, Wednesday, Friday) or use formulas to dynamically adjust based on the selected week.
For each day, allocate 5 hours (300 minutes) worth of cells, representing time slots. Step 2: Schedule jobs with formulas:
In a separate column, calculate the total runtime for each job from column Q by converting minutes to hours (e.g., =Q2/60).
Use a nested lookup formula to find the first available time slot for each job based on its runtime and existing schedules. The formula could look something like: Excel =IF(INDEX($D$2:$D$1000,MATCH(TRUE,($D$2:$D$1000<=C2)-($E$2:$E$1000<>0),0))>=$C2,$C2,INDEX($D$2:$D$1000,MATCH(TRUE,($D$2:$D$1000<=C2)-($E$2:$E$1000<>0),0))+($C2-INDEX($D$2:$D$1000,MATCH(TRUE,($D$2:$D$1000<=C2)-($E$2:$E$1000<>0),0)))) This formula checks for the first available time slot where the remaining slots after scheduling the current job's runtime are non-zero.
Step 3: Conditional formatting and overflow:
Apply conditional formatting to color-code scheduled time slots for each job (e.g., different colors for different jobs).
Use logical IF statements to handle jobs longer than a day. Check if the job runtime exceeds the remaining time in the current day and schedule the remaining portion on the next day's available slots.
Step 4: Dynamic adjustments and infinite rows:
Use formulas to dynamically adjust the calendar based on the chosen week (e.g., offset dates based on selected starting date).
Add new rows for jobs automatically by utilizing Excel's Table feature, which expands when new data is entered.
2. Gantt Chart with Add-ins: For a more visual representation, consider using Gantt chart add-ins like "Project Timeline for Excel" or "GanttPRO for Excel." These add-ins allow you to:
Import your job list with runtimes.
Set up a calendar with 5-hour blocks.
Schedule jobs by dragging and dropping on the Gantt chart, considering overlaps and overflows.
Color-code and customize the chart for better visualization.
Additional Tips: Test and refine your formulas and formatting with sample data. Consider using error handling for incorrect runtimes or overflows. Explore online tutorials and guides for specific formulas and add-in functionalities. While both methods require some effort, they can significantly improve your job scheduling process in Excel. Choose the approach that best suits your needs and comfort level with formulas and add-ins. Remember, I'm here to help you with any specific questions or difficulties you encounter along the way!