Display Last Value from End of Row in iWork Numbers

1

In iWork Numbers (v3.5.2) I would like to display the last value (not int or bool) from a row. I have an image of what I'm looking to do below.

In row 1 I have the Current pulling the value from the latest value, in this case the B under Spring. If possible I would like to be able to leave empty columns at the end of the row and have the Current only update if there's new data.

Is this possible?

fake_steve

Posted 2015-04-12T14:09:08.973

Reputation: 13

Answers

1

I believe what you want (in this case for row 1) is:

INDEX(C2:E2,COUNTIF(C2:E2,"*"))

Here's what it does:

  • COUNTIF gives you the number of cells that satisfy a condition. The condition I used was "*" which means any character. So if only two of the cells in C2 to E2 have a value, it will return 2, but if all three are present it will return 3.
  • INDEX will return the value of a cell in a range of cells. Our range here is again C2 to E2 and we've said in that range, give me the Xst cell, where X is the number that COUNTIF returns.

All together it's something like "count the number of cells that have something in them, use that number to get me last cell."

You'll have to change the range for each row, but numbers might be able to figure it out if you do a couple.

Edward Loveall

Posted 2015-04-12T14:09:08.973

Reputation: 228

Perfect. After testing, it appears that Numbers doesn't like blank cells in the middle, it will fill the function with an integer of 0. That said, this does exactly what I needed. – fake_steve – 2015-04-12T16:05:28.350

Latest Numbers is giving an error for COUNTIF(C2:E2,"*") so would recommend using COUNTA(C2:E2). – LordParsley – 2016-08-18T14:26:52.597