Hi,

I have a list of numbers as below

3
3
4
5
5
8

What i need is, i need a new column which contains rows obtained by substracting the previous row from the current row.

Like this...
0
0
1
1
0
3

It would be better, if I the following also,
1. No calculation done on 1st row (or) 1st & 2nd rows - if both are the same.
2. Instead of substracting the previous row, the row before that should be substracted - in places where the current row & previous row are the same. Also, No calculation done when the previous row becomes the current row.
Like this...
5th row --> 1 (5th row-3rd row, since 5th & 4th rows are the same &
4th row --> No Calculation to be done (or) atleast Value 0.

My requirement would be like this:

(No Value) <-- Considering 1st option
(No Value) <-- Considering 1st option
1
(No Value) <-- Considering 2nd option
1 <-- Considering 2nd option
3


Thanks.