Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Google Spreadsheets I have a number of columns that I have given title 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:

share|improve this question

migrated from superuser.com Feb 19 '11 at 1:03

This question came from our site for computer enthusiasts and power users.

up vote 6 down vote accepted

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.

share|improve this answer
Thanks - this is perfect. – Turgs Feb 19 '11 at 1:26

You were right on the money:


Returns the column number for the named range.

You must create a named range using the Data>Named Ranges menu item and the Add a Range option in the resulting sidebar. The name can't contain spaces or other invalid characters and, when used in a function such as the one above, must be unquoted.

share|improve this answer
I just checked that and it doesn't work !! Perhaps you can explain how this solution works? – Jacob Jan Tuinstra Jun 29 '14 at 12:38
@JacobJanTuinstra: They've changed the way it functions in recent versions. I've updated my answer to reflect that. – Dennis Williamson Jun 29 '14 at 14:30
You're alive !! Wow, thanks Dennis, I've learned something today. – Jacob Jan Tuinstra Jun 29 '14 at 15:40

I did it by adding a row that contains the formula =column()
Then find the column number with the vlookupfunction.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.