Display last value in the row

  • Thread starter Thread starter EMoe
  • Start date Start date
E

EMoe

Hello,
I asked this questions some time back in a previous post, and
received two formulas that doesn't seem to work:

=INDEX(A1:A12,MAX(IF(A1:A12<>0,ROW(A1:A12))))
=OFFSET(A1,-1+MAX((A1:A12>0)*ROW(A1:A12)),0)

This is what I want to happen:
Example: I have a list of figures ranging from A1:A12. These cell
contain formulas.
If I have currency values in A1:A5, A:6 down to A:12 will have $0.00
because those cells haven't been updated yet.

How do I display the last figure in the list in cell B1 (which in thi
case would be in A5); Without the $0's showing up as a value? Then a
A6 updates, and it's the last value in the list, then that's what
shown in B1.

I know that both formulas are array formulas (Ctrl,Shift,Enter). Th
first formula gives me a #Ref error. The second one just yields a 0 i
the cell.

I don't know whats wrong. Please help with a formula to do the above.

Thanks,
EMo
 
Try this: Hit F2 to edit the formula, then hit Control+Shift+Enter. These
are array formulas. Also, if you use the first suggested formula, you will
run into a problem if you move the befinning of your table to a row other
than the first row or insert rows above it. You could modify as follows to
prevent this if it is an issue.

=INDEX(A1:A12,MAX(IF(A1:A12<>0,ROW(INDIRECT("1:"&ROWS(A1:A12))))))
 
Thanks a lot!

Maybe that was it. I was trying to use another range of cells besides
the first column. Everything works good now.

I appreciate that!
Regards,
EMoe
 

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

Back
Top