Mau
Mau

Reputation: 1313

Formula to get cell values of specific column and a variable row number

I need a formula to retrieve a value defined by a specific column (always B) and a variable row number (A).

What is the formula I need to write in column C to retrieve the right names as shown below?

 _A_____B_______C_____
  3 | Lucas |  Gary      <--B3
 _____________________
  1 | Mark  |  Lucas     <--B1
 _____________________
  2 | Gary  |  Mark      <--B2

Upvotes: 0

Views: 2281

Answers (1)

Gerrat
Gerrat

Reputation: 29680

You want to use the INDIRECT function.

Column C should be:

=INDIRECT("B" & $A1)
=INDIRECT("B" & $A2)
=INDIRECT("B" & $A3)

(you can just enter the formula in the first cell and copy it down)

Upvotes: 4

Related Questions