by James Climer
26. October 2009 08:56
I have a spreadsheet that I planned to populate as the data became available. As I enter the data, I'd like to keep running totals based on the current state, which requires knowing the last entered value in the column. To do this, I defined my range, and used the INDEX function and the COUNTIF function to return the last, non-blank and non-zero item in the list.
Here is my formula:
INDEX(B4:B30,COUNTIF(B4:B30, ">0"))
This will return the last cell in column B from row 4 to 30 that is not blank and greater than zero.