Generally, I'm thinking you've got a couple problems here.
=IF(D14>=O18;SUM(D14-O18);"0")
Should read:
=IF(D14>=O18;D14-O18;0)
When you put quotes, Excel thinks you want text. So if you're using this IF on another cell that you're already using a bad IF statement on, it won't work right. Both text and formulas are seen as greater than zero (0) by Excel.
Does that help?