Sub topic 1
Structuring data so formulas can find it
Prerequisites
You should know basic Excel navigation and how to enter formulas. You should understand relative references (C5) and absolute references ($C$5), and be able to read a simple budget layout.
Flat data tables and unique keys
Keep each ledger as a flat table with one transaction per row and one field per column. Avoid blank rows and subtotals inside the data. Give every account a unique key, such as 4000-Sales, and make sure each key appears once in the assumptions list. Duplicate or misspelled keys make formulas skip rows without warning.
Totaling many rows or fetching one value
Decide the task before you write the formula. Aggregation adds every row that meets a condition, so use SUMIFS. Retrieval returns one value for one key, so use XLOOKUP or INDEX with MATCH.
Anchoring references and bounding ranges
Place $ before the column or row that must stay fixed when you copy a formula. Bound each range to the last data row, such as $F$2:$F$5000, instead of using whole columns. A bounded range is faster to calculate and makes the data extent explicit.
=SUMIFS(Data!$F$2:$F$5000, Data!$B$2:$B$5000, $A5)SUMIFS: sum range first, then criteria pairs
SUMIFS takes the sum range first, then pairs of a criteria range and a criteria value. Every criteria range must have the same number of rows as the sum range.
Criteria with operators, wildcards, and dates
Comparison operators go inside quotes and join to a cell reference with &. A wildcard * matches any text. Dates are stored as numbers, so compare them with operators rather than typed text.
=SUMIFS(Data!$F$2:$F$5000, Data!$C$2:$C$5000, "Opex*")=SUMIFS(Data!$F$2:$F$5000, Data!$B$2:$B$5000, $A5, Data!$D$2:$D$5000, ">="&C$3, Data!$D$2:$D$5000, "<="&EOMONTH(C$3,0))Exercise
A ledger has dates in column D. Which criteria pair limits a SUMIFS total to dates on or after the date in C$3?
Show answer
Data!$D$2:$D$5000, ">="&C$3. The operator is inside quotes and joins to the cell with &.