Dynamic Arrays
Phase 1 goal
Turn Excel from a calculation grid into a repeatable data pipeline: clean data with Power Query, look up and reshape with modern functions, wrap logic in LET/LAMBDA, and summarize with PivotTables on a Data Model.
π― Learning objectives
Tick each one when you can actually do it.
π‘ Key concepts
- Spill behavior: One formula returns many cells.
#SPILL!means something is blocking the output range. - Spill reference:
=COUNTA(E2#)refers to the whole spilled range starting at E2. - Core functions:
FILTER(array, include, [if_empty]), with multiple criteria using*(AND) and+(OR)SORT,SORTBY(sort by a column you don't display)UNIQUE(distinct lists for dropdowns)SEQUENCE(build month lists:=EOMONTH(start, SEQUENCE(12,1,0)))CHOOSECOLS,CHOOSEROWS,TAKE,DROP(shape outputs)VSTACK,HSTACK(append tables from several sheets)GROUPBY,PIVOTBY(formula-based pivots in current Microsoft 365. Check availability in your tenant.)
- Dynamic arrays vs. Tables: Spilled formulas can't live inside a Table. Put them on a report sheet that references Tables.
π Hands-on exercise: Live "Watch List"
Data: milestones (with Status and SlipDays from 1.1), risks (RiskID, ProgramID, Title, Likelihood, Consequence, Status, MitigationDueDate).
=SORT(FILTER(Milestones[[ProgramID]:[SlipDays]], (Milestones[Status]="Late")+(Milestones[Status]="At Risk"), "None"), 0, -1). Adjust the sort column index to SlipDays.- Make a dropdown of portfolios with
=UNIQUE(Programs[Portfolio])and a data-validation list pointing to=H2#. - Filter the watch list by the selected portfolio (add a criterion combined with
*). - Risk exposure:
=TAKE(SORTBY(FILTER(Risks[[RiskID]:[Title]], Risks[Status]<>"Closed"), FILTER(Risks[Likelihood]*Risks[Consequence], Risks[Status]<>"Closed"), -1), 10)gives the top 10 open risks by score. - Use
SEQUENCEandEOMONTHto build a 12-month FY2026 header (Oct 2025βSep 2026).
π¦ Mini-project: One-Formula Portfolio Summary
On a blank sheet, use GROUPBY (or UNIQUE + SUMIFS if GROUPBY isn't available) to summarize budget_execution by Program Γ Appropriation for FY2026: PlannedObligation, ActualObligation, and obligation rate %. Add a portfolio dropdown that filters everything. No PivotTables allowed.
π§ Self-check quiz
Answer in your own words, then check. Grade yourself honestly; your score is saved.
#SPILL! error?+, e.g. (Status="Late")+(Status="At Risk"). Use * for AND.=SUM(D2#) reference?