I already saw a few related questions on here about finding the last item but my question is a bit different because I'm trying to find the last not blank or non zero value in a column and either return that value or return 0 if there is nothing there. I have written a formula that works for me except for the very first row in the column and returns an error because it can't find a value. I tried to change the formula to return a 0 if it doesn't find anything but apparently wound up making the problem worse. Here is my current attempt at a formula:

```
=IF(B12=0,0,IF(LOOKUP(2,1/($B$10:B11<>0),$B$10:B11)=0, 0, B12 - IF(ISBLANK(LOOKUP(2,1/($B$10:B11<>0),$B$10:B11)), 0, LOOKUP(2,1/($B$10:B11<>0),$B$10:B11))))
```