Search code examples
excelworksheet-function

Last non-empty cell in a column


Does anyone know the formula to find the value of the last non-empty cell in a column, in Microsoft Excel?


Solution

  • This works with both text and numbers and doesn't care if there are blank cells, i.e., it will return the last non-blank cell.

    It needs to be array-entered, meaning that you press Ctrl-Shift-Enter after you type or paste it in. The below is for column A:

    =INDEX(A:A,MAX((A:A<>"")*(ROW(A:A))))