Difference between 2 cells (growing column)

S

Stumped???

I have a column of numbers, that grows one cell per day. I need to find the
difference between the previous day's cell and today's cell. The formula I
use is =SUM((LARGE(A5:A235,1))-(LARGE(A5:A235,2))), which works fine as long
as the current day's cell is greater than the previous day's; however when
the current day's cell is smaller, the number tends to be inaccurate. Is
there an IF function or other formula that can be used in the column that
would would look only at the last cell with data and the previous to it,
ignoring the rest and then would change as data is entered into the blank
cell infront of it?

Thanks!
 
M

MyVeryOwnSelf

I have a column of numbers, that grows one cell per day. I need to
find the difference between the previous day's cell and today's cell.
... Is there an IF function or other
formula that can be used in the column that would would look only at
the last cell with data and the previous to it, ignoring the rest and
then would change as data is entered into the blank cell infront of
it?


One way is to use something like:
=OFFSET($A$1,COUNT($A:$A)-1,0)-OFFSET($A$1,COUNT($A:$A)-2,0)
This assumes there are no gaps in the column.
 

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