Google Sheets – How to Return Value in Bottom Row of a Column

formulasgoogle sheets

I want to a cell to just print what the last cell in a column. If I were to have the column starting on row 17,

1
3
5

I want it to print five, but if I updated the list to

1
3
5
7

I want it to print 7, but I know nothing about the functions of spreadsheets.

Best Answer

Formula

=INDEX(A17:A,COUNT(A17:A))

Explanation

Assuming that the data is on the column A, that it only has numbers, and that there are not blank cells between two cells with numbers, COUNT(A17:A) will return the count of cells having a number and it will be the index of the last cell with a number on column A. Index will return the value of the last cell that has a number in column A.

NOTES

  • If the values are TEXT instead of NUMBER use COUNTA instead of COUNT
  • If the values are mixed, TEXT and other type like NUMBER / DATE / TIME / DURATION , instead of the above formula use

    =ARRAYFORMULA(INDEX(A17:A, MAX(IF(ISBLANK(A17:A),,ROW(A17:A)))))
    

    or

    =ARRAYFORMULA(INDEX(A17:A, MAX(IF(LEN(A17:A),ROW(A17:A),)))))
    

See also