need a formula

B

Bill H.

Is there a formula that can return the last non-zero number in a column of
numbers?

I have a column of numbers that I add to daily, and I need to know the value
of the last number in that column for use in another formula.

Thanks!
 
D

Debra Dalgleish

The following formula will return the last non-zero number in cells
A1:A20 --

=INDEX(A:A,MAX((A1:A20<>0)*ROW(INDIRECT("1:20"))))

It's an array formula -- type the formula in the cell, then hold the
Ctrl + Shift keys, and press the Enter key.
 
B

Bill H.

thanks!


Debra Dalgleish said:
The following formula will return the last non-zero number in cells
A1:A20 --

=INDEX(A:A,MAX((A1:A20<>0)*ROW(INDIRECT("1:20"))))

It's an array formula -- type the formula in the cell, then hold the
Ctrl + Shift keys, and press the Enter key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top