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

I have a spreadsheet in Google Docs like this:

           Johan    Mark    Gil    Pablo

Course 1      45      50     80       50
Course 2     250     300     50      270
Course 3      19      50     29       15
Course 4     270     250    250      250
Course 5       5       5     11       50
Course 6      45     250    250       17

I would like to retrieve the content of a cell given a column and a row headers.

The example here shown: the column header is "Pablo" and the Row header is "Course 3".

What's the function that retrieves the content of the cell in the matrix? (Resulting value should be "15".)

share|improve this question

This will work, based on a table with upper-left corner in A1, modify to suit actual:

=INDEX(A1:E7, MATCH("Course 3", A:A, 0), MATCH("Pablo", 1:1, 0))
share|improve this answer
It works very well ! Many Thanks! :-) – user12248 Jul 18 '11 at 10:13
@user12248, great, you can click on the checkmark to accept the answer as what solved your problem. – Lance Roberts Jul 18 '11 at 14:32
I'd suggest not hard coding the lookup values (maybe hold these in say H1 and I1) for a shorter and possibly more flexible version: =INDEX(A1:E7,MATCH(H1,A:A,),MATCH(I1,1:1,)) – pnuts Jun 18 '14 at 1:43
@pnuts, I agree, hardcoding isn't the best way. – Lance Roberts Jun 18 '14 at 2:03

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.