Google-sheets – Get column number by referencing column title

google sheets

In Google Sheets I have a number of columns that I have given titles to in Row 1. Using a formula, I want to return the column number (i.e. 5, 6, 7, …) for the column that has a specific title. For example: =GetColumnNumber("Account Balance").

This GetColumnNumber() function above doesn't actually exist, but it demonstrates what I'm trying to do.

Is there a way to achieve the same result?

I've found this function reference which I've been trying to sift through.

Best Answer

I think this will do what you want. For example if your columns are A to D,

=iferror(match("Account Balance",A1:D1,0),"No match")

returns the column number or an error message.

Thanks for pointing out that function list. It will come in handy.