Stop Using Indentation — Here’s How to Create Tasks and Subtasks in Excel (Properly)

Excel doesn’t have a ‘Task’ object. There’s no native subtask type. If your tutorial tells you to press Tab or use Increase Indent to build hierarchy, it’s selling you a visual illusion — not functionality. That indentation? It changes nothing in how Excel reads, filters, or calculates those cells. And worse: it breaks sorting, corrupts paste operations, and makes formulas brittle.

The Myth

People believe that formatting rows with indentation (Home → Increase Indent) creates a true parent-child relationship between tasks and subtasks. They’ll nest ‘Design homepage’ at A2, then indent ‘Wireframe layout’ at A3, then ‘Pick color palette’ at A4 — and call it done. But Excel sees three independent text strings in column A. No structural link. No way for SUMIFS to sum only subtasks under ‘Design homepage’. No way to collapse or expand. No way to auto-number based on depth. It’s styling masquerading as structure.

The Reality

Real task-subtask hierarchy requires explicit, formula-driven columns: one for Task ID, one for Parent ID, and optionally a Level column. This turns flat data into a relational tree — something Excel can filter, sort, and compute across reliably. Below is a working 7-row hierarchy built this way — all formulas recalculating instantly when you add or reassign parents.

StepActionResultShortcut
1In A1:A7, enter unique IDs: 1, 2, 3, 4, 5, 6, 7Each row now has a stable identifier
2In B1:B7, enter task names: Website Launch, Design homepage, Wireframe layout, Pick color palette, Develop backend, API integration, Deploy stagingClear, human-readable labels
3In C1:C7, enter Parent IDs: 0, 1, 2, 2, 1, 5, 5C2=1 means ‘Design homepage’ belongs under ID 1 (‘Website Launch’)Alt+H+I+I (Increase Indent — but don’t use it!)
4In D1, enter =IF(C1=0,0,1+INDEX($D$1:$D$7,MATCH(C1,$A$1:$A$7,0))) and drag downAuto-calculates nesting level: 0→1→2→2→1→2→2Ctrl+Enter (to fill formula without moving)
5In E1:E7, enter status: In Progress, Not Started, Done, Blocked, In Progress, Done, Not StartedSupports conditional formatting and pivot-ready filtering
6Select A1:E7 → Data → Group → Auto Outline (or use SUBTOTAL)Creates collapsible outline using real hierarchy — not indentationAlt+A+J+O
7Add =FILTER(A1:E7,(D1:D7=1)+(D1:D7=2)) to extract all top-level + subtasksDynamic spill range that updates when hierarchy changesCtrl+Shift+Enter (legacy) or Enter (365)

Why the Myth Persists

Early Excel versions (pre-2010) had no dynamic arrays, no FILTER, no LET — so trainers defaulted to visual tricks. Microsoft’s own legacy documentation still shows indentation screenshots in ‘Project Planning’ examples. YouTube tutorials from 2016–2020 dominate search results, repeating the same flawed workflow. And because indentation *looks* hierarchical in printouts or PDF exports, people assume it’s functional — until they try to filter only subtasks of ‘Develop backend’ and get zero results.

The Right Way

Start with this live dataset in A1:E7:

IDTaskParent IDLevelStatus
1Website Launch00In Progress
2Design homepage11Not Started
3Wireframe layout22Done
4Pick color palette22Blocked
5Develop backend11In Progress
6API integration52Done
7Deploy staging52Not Started

The magic is in column D’s formula. It’s recursive in spirit (though Excel doesn’t support true recursion) — using INDEX/MATCH to pull the parent’s level and add 1. That’s what makes filtering by level or building Gantt-style timelines possible. The beauty of this approach is that you never touch the mouse after setup: paste new rows, update Parent IDs, and everything cascades.

Surprising tip: Don’t hide column C (Parent ID). Instead, freeze it and use it as your editing anchor. When reassigning ‘Pick color palette’ from Parent ID 2 to 5, just change C4 — and D4 updates instantly, along with any downstream formulas referencing Level.

Proof It Works

Here’s how the same 7 tasks behave before (indent-only) vs. after (ID/Parent/Level):

CapabilityIndent-Only ApproachID/Parent/Level Approach
Filter subtasks of ‘Develop backend’Impossible — no structural link=FILTER(B1:B7,C1:C7=5) → returns rows 6 & 7
Count subtasks per parentRequires manual counting or fragile COUNTIF on indented text=COUNTIF(C1:C7,1) → 2; =COUNTIF(C1:C7,2) → 2
Sort by priority, keeping hierarchy intactBreaks nesting — subtasks scatterSort by Level, then by Status → hierarchy preserved
Add new subtask under ‘Wireframe layout’Must manually indent, guess spacing, risk misalignmentAdd row: ID=8, Task='Mobile mockup', Parent ID=3 → Level auto-calcs
Export to Power BI with hierarchyNo parent-child metadata — flat table onlyPower BI recognizes Parent ID column as hierarchy source

Exceptions

There are exactly two cases where indentation *is* acceptable — and only then as a final presentation layer:

  • Printing static reports: If you’re generating a one-time PDF for stakeholder review and need visual nesting, apply indent *after* your ID/Parent logic is solid — never before.
  • Legacy Excel 2003 files: If you’re maintaining ancient workbooks without access to dynamic arrays or even SUBTOTAL, indentation is the least-bad fallback — but migrate immediately.

One last thing: Never use spaces or dashes to simulate hierarchy (e.g., “– API integration”). That breaks FIND(), SEARCH(), and every text-parsing function. Your hierarchy must be numeric, stable, and formula-driven — not typographic.

Your next step: Open a blank sheet. Paste the 7-row table above into A1:E7. In D1, enter the Level formula. Press Ctrl+Enter to fill it down. Then try =FILTER(B1:B7,D1:D7=2) in cell G1. Watch it spill ‘Wireframe layout’, ‘Pick color palette’, ‘API integration’, and ‘Deploy staging’ — all correctly grouped by depth. That’s not magic. It’s Excel working as designed.

Michael Lee

Michael Lee

Michael covers the latest in office software updates