If you're having trouble entering a long and difficult formula into Excel it helps if you break it into sections a little like computer code. This is not difficult and helps you match parentheses and locate missing commas etc. For example - =if(d12<f12,"Yes","No") can be written
This is obviously a trivial example. What you might not know is that Excel will accept your formula written like this. You can either do it in Notepad or similar and then copy and paste or you can expand Excel's formula box by placing your mouse cursor over the bottom edge of the box till it changes to a double-headed arrow, click and drag the border as low as you need. This is a slightly better way than clicking the down arrow at the right hand side of the box as you have control over the size of the box. Doing it this way gives you the advantage of access to Excel's color coding. Just use Alt-Enter for a new line inside the formula box.