maninjapan
01-08-2010, 01:06 AM
I have a column of price data for a stock which due to some errors in the data has some rows which return zero. This affects my calculations so in the next column I am using the following If statement to just refer to the price above
=IF(B50<=1,B49,B50)
This works fine for the most part, however occasionally there are 2 or more zeros in a row. So I need to fix the if statement to keep going up the list till it finds a row with a price that isnt zero in it.
Is there a simple way to adjust this IF statement to do this?
Thanks.
=IF(B50<=1,B49,B50)
This works fine for the most part, however occasionally there are 2 or more zeros in a row. So I need to fix the if statement to keep going up the list till it finds a row with a price that isnt zero in it.
Is there a simple way to adjust this IF statement to do this?
Thanks.