ok, look at this line, which does all the job:
Cells(1, 1).Value = Cells(lastrow, 1).Value - Cells(2, 1).Value
maybe you can use this instead :
Cells(1, 1).Value = Cells(lastrow, 1).Value - Cells(lastrow-1, 1).Value
it subtracts the last value from the previous...
|