Functions are named algorithms. IF is a decision you can test at the boundary.
Week 4 · Excel Ch. 2 (functions) · Excel Project 4. Next: charts (lecture 5).
SUM vs AVERAGE vs COUNT)IF (or IFS) you can explain, including the boundaryAND / OR without guessing what Excel treats as TRUESUM(B2:B20) means: add the numbers in this range =NAME(argument1, argument2, …) — the = is still “this is an instruction”XLOOKUP) wait until lecture 8; stats (MEDIAN, STDEV) wait until lecture 9| Question | Function | Watch out |
|---|---|---|
| Total of a quantity | SUM | Text “numbers” are skipped or error |
| Typical value | AVERAGE | Blanks vs zeros change the story |
| Smallest / largest | MIN / MAX | Dates and numbers mixed = nonsense |
| How many numeric scores? | COUNT | Ignores text labels |
| How many filled cells? | COUNTA | Counts "N/A" as present |
| How many empty? | COUNTBLANK | Spaces are not blank |
| Total if a condition holds | SUMIF / SUMIFS | Criteria types (">=10" vs a cell) |
{10, 10, 10, 100} is pulled by the 100AVERAGE is already biasedViable, else Too small”=IF(B2>=10,"Viable","Too small") IF(condition, value_if_true, value_if_false) TRUE / FALSE, not the text "TRUE" >=10, the rows that matter are 9, 10, and blankChecks sheet before filling the column=IF(ROUND(B2,2)>=0.70,…) if the rule is two decimal placesIFs get hard to audit after three levelsIFS(test1, result1, test2, result2, …) is flatter, still needs a final catch-allIFspass as TRUE/FALSE, then a second column for the label — easier to checkAND(A2>=0.7,B2>=0.7) — both must holdOR(A2="Review",B2="Missing") — either holdsNOT(ISBLANK(C2)) — sometimes clearer than double negatives0, which can make B2>=10 unexpectedly FALSE or TRUE =IF(A2=70 or A2=80, …) is not Excel syntax; use OR(A2=70,A2=80) "TRUE" (text) is not TRUE (Boolean) — IF may not branch how you thinkIF returning "" looks blank but COUNTA still counts it — know which you wantStatus = IF([@Weighted]<0.7,"Review","OK") (or ordinary cell refs if you are not in a Table yet)0.70, one blank weighted cellFlag = AND([@Quiz]<0.6,[@Exam]<0.6) — “weak on both”COUNTIF to count Review — compare to a filter you can seeIF or IFS for letter bands; write the bands in words firstAVERAGE of a column that includes one blank and one zeroOK or Review? Who decides — the formula or the syllabus rule?IF a smell that you wanted a lookup table?IF is a decision; boundaries and blanks are part of the test planSUMIF/COUNTIF mini-lab as a bridge to PivotTablesIFERROR — teach last, so it does not hide type bugsXLOOKUP