Your formula includes column letters (which should include O instead of P), but are missing the row number. To leave the value blank when the condition is false, use "" instead of 0. So, in P2 you will want to enter =IF(N2="PAID",O2-H2,"") and then copy this down to the other rows.
For Q, R and S, use the same formula but replace O2-H2 with the relevant calculation.
Bookmarks