I am in need of help with the following if function. I moved the `if(isblank)` part of it up further in the condition.

Initially, the formula was this and it worked.

`=IF(O9="TBD", "TBD", IF(G9="New Phase",I9-30, IF(ISBLANK(O9), I9-$P9,O9)))`

Now the new formula is this.

`=IF(O9="TBD", "TBD", IF(ISBLANK(O9), I9-$P9,O9, IF(G9="New Phase",I9-30)))`

When entering the formula the `'` symbol keeps moving into the front of it, so I know that I have it wrong, I just can't figure out what it is. Does anyone see what I am doing incorrectly?

[![enter image description here](https://i.stack.imgur.com/0NNo6.png)](https://i.stack.imgur.com/0NNo6.png)