Problem Solving with a Spreadsheet and a Programming Language
Problem Solving with a Spreadsheet and a Programming Language combines the two practical tools of the exam: a spreadsheet for calculation and a program for data processing.
Spreadsheet rules
- Relative
A1shifts when filled; absolute$A$1does not; mixedA$1and$A1lock one coordinate. IF(condition; then; else)nests, andAND,OR,NOTbuild compound conditions.COUNTIF(range; criterion),SUMIF(range; criterion; sum_range), plusCOUNTIFS,SUMIFSandAVERAGEIF.VLOOKUP(value; range; column; FALSE)for exact match;TRUEassumes sorted data and matches approximately.INDEX+MATCHorXLOOKUPavoids the left-column limitation.- Text “5” is not the number 5; CSV import may need a decimal-comma locale;
TRIMremoves stray spaces that break matching.
Programming side
Read the input, validate its shape, choose a structure (list, dictionary, counter), compute, then format output exactly as specified. Handle empty input, a single record, and maximum size.
Worked example
=SUMIF(B2:B100; “Math”; D2:D100) adds points in D for rows where B is exactly Math. If a cell holds “Math ” with a trailing space the criterion fails; wrapping the column in TRIM fixes it. For counting above a threshold, =COUNTIF(D2:D100; “>50”) works only because the operator sits inside a quoted text criterion, not because 50 alone was typed.
Traps
- Relying on VLOOKUP's default
TRUEand getting an approximate result. - An off-by-one column index in VLOOKUP.
- Forgetting
$anchors when copying a formula down, so ranges slide. - Creating a circular reference, where a cell depends on itself.
- Sorting one column but not the adjacent data, so rows desynchronise.