Get value from the cell above

后端 未结 2 1738
甜味超标
甜味超标 2020-12-23 14:42

Is it possible in Google Spreadsheets to reach the value of the cell just above?

Meaning: In one cell A2 I want to display the value from the cell above

2条回答
  •  余生分开走
    2020-12-23 15:15

    You can address it like this:

    =INDIRECT(ADDRESS(ROW()-1,COLUMN()))
    

    COLUMN() returns a numeric reference to the current column

    ROW() returns a numeric reference to the current row.

    In the example here, subtracting 1 from the row gives you the previous row. This math can be applied to the ROW() and/or the COLUMN(), but in answering your question, this formula will reference the cell above.

    Then we have ADDRESS() which accepts a numeric row and column reference and returns a cell reference as a string.

    Finally INDIRECT() allows you to pass a cell reference in as a string, and it processes it as a formula.

    Google Spreadsheets give you help hints as you type, so you should get a full explanation of each function as you type the formula above in.

提交回复
热议问题