How to turn a spreadsheet task into an Excel formula
Translate a spreadsheet task into a documented function, map its arguments and references, check compatibility, and test the result before filling cells.
Turn the task into four facts before typing: the operation, the source cells, any condition or lookup key, and the desired result. Choose a documented function whose argument shape matches those facts, map each range deliberately, decide which references should move when copied, check the target Excel version and regional separator, then test the formula on a small copy of the workbook.

Rewrite the task as an operation and inputs
Replace the vague request with a concrete sentence: what should be calculated, which cells supply the values, which condition or key applies, and where the result will be used. Keep units and missing-value behavior explicit. This prevents a syntactically valid formula from answering the wrong question.
- Name the result: total, count, average, lookup or another documented operation.
- Identify the value range or lookup cell.
- Write each condition and the range it evaluates.
- State what should happen when no value matches or an input is blank.
Choose the function from its documented argument shape
Match the task to the function definition, not to a remembered example. SUMIF uses range, criteria and optional sum_range in that order; SUMIFS uses a different order. XLOOKUP separates the lookup value, lookup array, return array and optional fallback. Read the target function page before adapting arguments.
Map ranges and verify their dimensions
Assign one visible cell or range to every argument slot. Conditional range pairs should cover corresponding rows and columns. A formula can be accepted while referencing the wrong shape, so compare the first cell, last cell and dimensions before testing values.
Decide what should move when the formula is copied
Relative references change with the formula's new position. Absolute references keep both row and column fixed; mixed references fix one part. Choose the reference type from the intended fill direction, then copy the formula to one neighboring cell and inspect every changed address.
Check compatibility, locale and the result on real cells
Confirm the function exists in the workbook's target Excel version. Microsoft notes that XLOOKUP is unavailable in Excel 2016 and Excel 2019. Regional settings can also use a semicolon rather than a comma between arguments. Test known matching, non-matching, blank and boundary rows on a copy before filling a production range.
Check the primary references
Check the source against the result
Task: add the amounts in C2:C100 only for rows whose status in B2:B100 is the text paid.
=SUMIF(B2:B100,"paid",C2:C100)
The criteria range and sum range have matching dimensions, and the text criterion is quoted. The formula does not prove that B contains canonical statuses, C contains valid amounts, row 100 is the correct boundary or comma is the workbook's argument separator; inspect those facts in the target workbook.
Map a supported task to a formula
Choose one of six reviewed recipe shapes, validate simple A1 references and inspect the compatibility note before copying the result.
Open Excel Formula Generator