Display last value from a row or column?

I'm new to Numbers. How do I display last value from a row or column? What formula can I place in cell C2 to display the last entry in column B?

User uploaded file

iMac, OS X El Capitan (10.11)

Posted on Oct 15, 2015 12:33 PM

Reply
8 replies

Oct 15, 2015 2:08 PM in response to Bruce Kieffer

OFFSET is a powerful but "volatile" function, meaning it recalculates when you so much as breathe on your spreadsheet, which can slow things down if you have a document of any size. (I'm exaggerating about the breathe part, but you get the idea). INDEX is less processing intensive, and in a case like this, simpler to use IF you don't have any blank cells among your values (blank cells after, of course, is no problem).


Here's OFFSET doing the same thing as INDEX in my post above ...


User uploaded file



=OFFSET(B1,COUNTA(B),0)



No advantage to using it instead of INDEX in this case. But if you do have blanks among your values, Wayne's approach with OFFSET and an extra column will do the trick.


SG

Oct 15, 2015 2:22 PM in response to Bruce Kieffer

Bruce Kieffer wrote:

Can the formula be modified to work on a range of cells in a column?


Yes, you can do something like this:


User uploaded file


(The +1 in the original formula dealt with the Header Row).


However, you may not want to use a specific range. Referencing the entire column in a Numbers table means you don't have to worry about changing the formula if the number of rows in the body of your table expands; it's self-expanding).


SG

Oct 15, 2015 12:56 PM in response to Bruce Kieffer

the only way I can come up with is to create a second column that marks entries. Then you can use the marker to locate that last item... like this:


User uploaded file


In this example, enter the data in column B (just to match your input).

C2=IF(B2="", "", MAX($C$1:C1)+1)


this is shorthand for, select cell C2, then type (or copy and paste from here) the formula:

=IF(B2="", "", MAX($C$1:C1)+1)


select cell C2, copy

select cells C2 thru the end of column C, paste


cell E3 contains the value in the last cell of column B.

E3=OFFSET($B$1,MATCH(MAX(C), C)−1, 0)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Display last value from a row or column?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.