Skip to content

How to find the column number of a value in Excel and Google Sheets

Excel & Google Sheets
=MATCH("Sales",$A$1:$D$1,0)

Verified example

Computed by a real spreadsheet engine on the sample data below.

RegionUnitsSalesProfit
North10050001200
South804000900
East12060001500
West9045001050

=MATCH("Sales",$A$1:$D$1,0)3

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. 1Apply MATCH horizontally across a row of headers: =MATCH("Sales",$A$1:$Z$1,0) returns the column position within that header row.
  2. 2To convert to an absolute column number, add COLUMN of the first cell minus 1: =MATCH("Sales",$A$1:$Z$1,0)+COLUMN($A$1)-1.
  3. 3Use the result as the col_num in INDEX: =INDEX(A2:D10,MATCH(lookupRow,A2:A10,0),MATCH("Sales",A1:D1,0)) for a fully dynamic two-way lookup.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

How do I get the column letter instead of the column number?

Wrap the result in SUBSTITUTE and ADDRESS: =SUBSTITUTE(ADDRESS(1,MATCH("Sales",$A$1:$Z$1,0),4),"1","") returns the column letter(s) like "C".

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

Last reviewed: