Hello,
I am trying to figure out how to display the latest non-zero value in a row. Note, I am not looking for the last value (there is plenty of help here and else where on that) but the latest/most recent. Here is an example:
<tbody>
</tbody>
In Attempt 1 I used the formula =IF(B1=0,OFFSET($B$1,0,(COUNT($B1:B1)-COUNTIF($B1:B1,0))-1),B1) dragging from left to right (so the COUNT ranges were increasing with each cell)
In Attempt 2 I used the formula = =IF(B1=0,INDEX($B1:B1,,MATCH(0,$B1:B1,0)-1),B1) again dragging from left to right.
Any ideas how I can achieve my desired outcome?
Thank you!
I am trying to figure out how to display the latest non-zero value in a row. Note, I am not looking for the last value (there is plenty of help here and else where on that) but the latest/most recent. Here is an example:
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | 0 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | |||||||||
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | 149.1 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | |||||||||
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | 149.1 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | |||||||||
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | 149.1 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody>
</tbody>
In Attempt 1 I used the formula =IF(B1=0,OFFSET($B$1,0,(COUNT($B1:B1)-COUNTIF($B1:B1,0))-1),B1) dragging from left to right (so the COUNT ranges were increasing with each cell)
In Attempt 2 I used the formula = =IF(B1=0,INDEX($B1:B1,,MATCH(0,$B1:B1,0)-1),B1) again dragging from left to right.
Any ideas how I can achieve my desired outcome?
Thank you!