Finding Last Entry in a Column

January 04th, 2012 - 09:40 am ET by RFJ email | Report spam
Can anyone help. I've got a stock control spreadsheet where a new row is
entered when the stock position changes. Column D has the stock position.

Below the row showing the latest stock position are empty rows for future
use.

At the bottom of the table, below the empty rows, is a cell in Column D
where I want to report the latest stock figure.

Is there a way to do it that isn't upset by those empty cells.

Sample data and outcome would typically look like

Day 1 25
Day 2 33
Day 3 11
<empty> <empty>
<empty> <empty>
<empty> <empty>

Curr Stock 11


Tx
email Follow the discussionReplies 3 repliesReplies Make a reply

Replies

#1 Ron Rosenfeld
January 04th, 2012 - 09:59 am ET | Report spam
On Wed, 4 Jan 2012 14:40:56 -0000, "RFJ email" wrote:

Can anyone help. I've got a stock control spreadsheet where a new row is
entered when the stock position changes. Column D has the stock position.

Below the row showing the latest stock position are empty rows for future
use.

At the bottom of the table, below the empty rows, is a cell in Column D
where I want to report the latest stock figure.

Is there a way to do it that isn't upset by those empty cells.

Sample data and outcome would typically look like

Day 1 25
Day 2 33
Day 3 11
<empty> <empty>
<empty> <empty>
<empty> <empty>

Curr Stock 11


Tx






Assuming your Curr Stock formula is in row 8.

D8: =LOOKUP(2,1/ISNUMBER($D$1:D7),$D$1:D7)

Note the absolute reference to D1 and the relative reference to D7
When you insert rows, the references will adjust appropriately, and should give the correct answer even before you enter data above. In other words, the formula is not dependent on the number of blank lines between your data and the formula.

Similar topics