FormulaCraft

How to sum a column found by its header in Excel and Google Sheets

Topic:SUM & aggregation
Excel & Google Sheets
=SUM(OFFSET(A1,1,MATCH("Sales",A1:C1,0)-1,3,1))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1MATCH("Sales", A1:C1, 0) returns the position of the Sales header — here column 2.
  2. 2OFFSET starts one row below the header, shifts to that column, and takes a 3-row-tall block.
  3. 3SUM totals the block — 100 + 200 + 150 = 450 — and follows the header if columns are rearranged.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What if the header is not found?

MATCH returns #N/A. Wrap it in IFERROR to show a friendly message, but fix the header text rather than hiding the error.

More on SUM & aggregation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: