Search code examples
excel-formulasyntaxreferencegoogle-sheets-formulaindirection

Referencing a variable column value in a Google Sheet formula


I want to use the value of a cell as the column value of a cell reference in a formula.

For example:

  • cell A1 has the value 12
  • In another cell, I want to reference the value of another cell using a hard-coded Row with the value of A1 as the column, like this: =$F$[value of A1]
  • So the result is =$F$12 which displays the value in F12.

I think using INDIRECT is required but couldn't figure it out.


Solution

  • do it like this:

    =INDIRECT("F"&A1)
    

    or if you want to lock A1 value:

    =INDIRECT("F"&$A$1)
    

    =INDIRECT("All Active - Paid Accounts!F"&$A$1)