I assume that you are talking about periods in your (financial) year. What do you want to achieve with this formula? For you are saying that when P9s Area is smaller/equal to 0, then take P8 else do the same for P8/P7. But what if your second statement is true? What does that mean?