Yes. You can make an Excel Gantt chart template with dependencies by keeping tasks, durations, predecessor IDs, and calculated dates in a table, then using conditional formatting to draw the timeline bars. Excel does not turn an ordinary Gantt chart into a project-scheduling system automatically: the dependency formulas must calculate the dates, and the chart must display them.
What a dependency-enabled Gantt template does
A Gantt chart shows tasks against dates; a dependency specifies when one task is allowed to start or finish relative to another. For example, a site inspection may need to finish before equipment installation begins. If the inspection slips, a useful template updates the installation date and its bar instead of leaving the original date in place.
For a straightforward workbook, use a finish-to-start (FS) relationship: the successor task starts after its predecessor finishes. That is the most common relationship for a simple schedule, but it is not the only possible one. Start-to-start, finish-to-finish, and start-to-finish links require different scheduling logic.
The setup below handles one predecessor per task, workday durations, and FS links. That is enough for many small projects and makes the rules easy to inspect. For multiple predecessors, complex lags, resource leveling, or hundreds of linked tasks, Excel can become harder to maintain than dedicated project-management software.
Set up the task table
In Excel for Microsoft 365 on Windows, create these headings in row 4 and enter tasks from row 5. Keep each task ID unique and use the same ID in the predecessor column; task names alone are less reliable because names can change or be duplicated.
- A: Task ID — a unique value such as T01.
- B: Task — a clear activity name.
- C: Duration — the number of working days, such as 2 or 5.
- D: Predecessor ID — the task that must finish first; leave blank for a task with no predecessor.
- E: Start — a calculated start date.
- F: Finish — a calculated finish date.
- G: Lag (workdays) — optional delay or overlap, with zero meaning no extra delay.
Put the project start date in H1 and format it as a date. For example, enter May 4, 2026. Format the start and finish columns as dates, and make duration and lag numeric values. In this template, a duration of one means one working day. The schedule excludes Saturdays and Sundays; holidays can be excluded as well by supplying a holiday-date range to WORKDAY.
Arrange the work so that each predecessor is a real task and the dependency graph has no loops. You can sort the rows for readability, but do not use a predecessor ID that points back to the same task or creates a circular chain. For a simple project, listing each predecessor before its successor makes the schedule easier for people to follow.
Calculate start and finish dates
With IDs in A5:A100, durations in C5:C100, predecessor IDs in D5:D100, finish dates in F5:F100, lags in G5:G100, and the project start date in H1, enter this formula in E5 and fill it down. It uses XLOOKUP to find the predecessor’s finish date. XLOOKUP is available in Microsoft 365 and Excel 2021 or later.
=IF(ISBLANK(D5),$H$1,WORKDAY(XLOOKUP(D5,$A$5:$A$100,$F$5:$F$100),1+N(G5)))
For a task without a predecessor, the formula uses H1. Otherwise, it begins on the next workday after the predecessor finishes. A lag of 1 adds another working day; a lag of -1 allows the successor to start on the predecessor’s finish date. This is a simple workday convention, so document it in the workbook rather than assuming every reader interprets lag the same way.
With start dates in E5:E100 and durations in C5:C100, enter this formula in F5 and fill it down to calculate finish dates:
=WORKDAY(E5,C5-1)
The minus one makes a one-day task finish on its start date. For example, if H1 is Monday, May 4, 2026, a two-workday task with no predecessor starts May 4 and finishes Tuesday, May 5. A task that depends on it with zero lag starts Wednesday, May 6. That result assumes the dates are weekdays and no holiday calendar has been added.
To exclude holidays, list holiday dates in a range such as J2:J20 and add that range as the third argument to each WORKDAY formula. For the finish calculation, with the same task columns and holidays in J2:J20, use =WORKDAY(E5,C5-1,$J$2:$J$20). Apply the same holiday range to the start calculation’s WORKDAY call if the project calendar should skip those dates too.
Draw the Gantt chart with conditional formatting
Put the first date of the visible timeline in I4 with =$H$1. In J4, enter =I4+1 and fill right to create a calendar-day timeline. If you want columns for working days only, use =WORKDAY(I4,1) in J4 instead. Format the header row as dates and extend it far enough to cover the project.
To create bars, select the timeline cells for the task rows, for example I5:AZ100. On Windows, choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. With the selected range beginning at I5, enter this formula, choose a fill color, and confirm:
=AND(I$4>=$E5,I$4<=$F5)
The formula compares each timeline date with that row’s calculated start and finish. The dollar signs keep the date row and task date columns in the right places as the rule is evaluated across the selected grid. Excel for Mac has conditional formatting too; ribbon wording and dialog layout can vary slightly by release. Excel for the web can work with many formulas and formatting rules, although the desktop app is often easier for building and adjusting a large template.
If the timeline includes weekends, bars will also color weekend dates between a task’s start and finish. That is not necessarily an error: the task still has a workday duration, while the bar spans the calendar interval. To make nonworking days clearer, use a separate conditional-formatting rule to shade weekend columns, or use a workday-only timeline.
Make the template easier to maintain
A template is only useful if people can update it without breaking the schedule. Add a few checks before sharing it:
- Use Data > Data Validation to restrict durations to positive whole numbers and, where practical, predecessor IDs to the list of task IDs.
- Keep one task per row and avoid merged cells in the task table; merged cells complicate sorting, filling formulas, and filtering.
- Freeze the task headings or the first columns if the schedule is wide, so task names remain visible while you scroll through dates.
- Use consistent date formats and distinguish input cells, such as duration and predecessor, from calculated cells.
- Add a notes field for assumptions such as the workweek, holidays, and what a positive or negative lag means.
Consider converting the task range to an Excel table with Insert > Table. Tables can make filtering and formatting more convenient, but check the formula references and conditional-formatting range after expanding the schedule. A table does not, by itself, add dependency scheduling.
Limits and common dependency problems
The sample formulas expect one predecessor ID in each row. If a task cannot start until three separate tasks are complete, the single predecessor field cannot represent that rule. A workaround is to redesign the model with a separate dependency list and calculate the latest required predecessor finish, but that requires more careful formulas and validation. Do not put comma-separated IDs into the basic predecessor cell and expect XLOOKUP to schedule all of them.
Also distinguish a dependency from a manually entered date. If you type over a calculated start or finish, the task may no longer move when its predecessor changes. Protecting formula cells or visually marking them can prevent accidental overwrites. A blank or misspelled predecessor ID can also produce a lookup error; verify that every referenced ID exists exactly once.
Dependencies can be logically valid and still make a schedule unrealistic. A formula does not know that a person is assigned to two tasks at once, that a supplier has limited capacity, or that a task needs a specific resource. It also does not automatically identify every project risk. Review the resulting dates and assumptions with the people responsible for the work.
When Excel is a good choice
Excel is a sensible option when a schedule is modest, one person or a small group maintains it, and the main need is a readable timeline with a few straightforward links. It is flexible, familiar, and easy to tailor with extra columns for owners, status, priority, or notes. There is no separate software purchase required if Excel is already available, though access depends on the user’s Microsoft 365 or Office arrangements.
Choose a dedicated project-scheduling tool when the plan needs many-to-many dependencies, several dependency types, a critical-path calculation, baseline tracking, resource allocation, or frequent collaborative updates. Those features vary by product and subscription, so compare the exact capabilities and current pricing before moving a project. A static Gantt template may still be useful for reporting, but it should not be mistaken for a full scheduling engine.
Frequently Asked Questions
Does Excel have a built-in Gantt chart template with dependencies?
Excel includes charting and formatting tools, and templates may be available from Microsoft or other sources, but an ordinary Gantt-style template does not necessarily recalculate successor dates from predecessor links. Check the template’s formulas and features before relying on it; the task table and formulas above provide a transparent basic setup.
Can a dependent task start automatically when its predecessor changes?
Yes, if its start and finish cells contain formulas linked to the predecessor, as in this example. The bar then follows the calculated dates. If you enter dates as fixed values instead, changing the predecessor will not automatically reschedule the successor.
Can one task have more than one predecessor?
Not with the single-predecessor formula as written. It handles one predecessor ID per task. Multiple predecessors need a different data structure and a calculation that uses the latest required predecessor finish, or a project tool designed for that relationship.
Does the template calculate critical path?
No. Conditional formatting displays dates; it does not identify the critical path. Critical-path analysis needs forward and backward schedule calculations, float calculations, and well-defined dependency logic beyond this basic template.
Can I use calendar days instead of working days?
Yes, but the formulas need to match the schedule convention. WORKDAY skips weekends (and optional holidays), so it is suitable for workday schedules. For calendar-day durations, use date arithmetic and clearly define whether the start date counts as day one.
Related
- Excel Data Validation: Change Cell Colors Automatically
- Excel Data Validation Character Limits and Messages
- Excel Data Validation: Create a Filtered Dropdown List
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Line Chart Comparing Two Years: A Clear SetupTo make an Excel line chart comparing two years, put the shared time periods in the first column…
- Spider Web Chart in Excel: How to Create and Read ItA spider web chart—usually called a radar chart in Microsoft Excel—plots several categories around a circle so you…
- Box Plot in Excel: How to Chart Multiple Data SeriesYes. In Excel for Microsoft 365 on Windows, put each group of numeric observations in its own column,…
- Create a Gantt Chart in Excel: A Practical Step-by-Step GuideTo create a Gantt chart in Excel, list each task, its start date, and its duration, then insert…
- Excel Line Chart With Error Bars: How to Add ThemTo add error bars to a line chart in Excel for Microsoft 365 on Windows, select the chart,…
- Build a Gantt Chart in Excel: Step-by-Step GuideTo build a Gantt chart in Excel for Microsoft 365 on Windows, list each task with a start…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.