Module 8 ยท Lesson 39

MATCH and XMATCH

Return the position of a value for use in flexible formulas.

Why this lesson matters: MATCH and XMATCH

Return the position of a value for use in flexible formulas. In this module, the skill supports a larger goal: Build flexible one-way, two-way, and multi-criteria retrieval logic. The practical application is to locate a selected month inside a planning model.

=XMATCH(H2,Headers,0)

Build it step by step

Work from the business question toward the formula or tool. Keep the source data separate from the output and make every important assumption visible to the reviewer.

  • Choose the smallest lookup and return arrays that solve the question.
  • Use explicit not-found behaviour.
  • Test duplicate, missing, and boundary matches before release.

Check the result and common failure points

Compare a sample of advanced lookup results with a manual filter of the source data. Also test a known record, a missing or blank value, and a boundary case. Confirm that ranges are the same size, units are consistent, and copied references move only where intended.

  • Compare at least one result with a manual calculation or filtered source record.
  • Test blanks, zeros, duplicates, errors, and the exact rule boundary.
  • Reconcile row counts or totals before relying on the output.

Use the result in a decision

Locate a selected month inside a planning model. Label the output clearly, state its period and unit, and explain the action it supports. A technically correct result is only complete when another person can understand, refresh, and review it.

Key takeaway: MATCH and XMATCH becomes dependable when its purpose, source data, assumptions, and checking method are all explicit.