Welcome to the Board!
It is structured incorrectly.
Can you tell us in plain English exactly what you want it to do?
[COLOR=#333333]=IF(isblank(D12),[/COLOR][COLOR=#ff0000][B]IF[/B][/COLOR][COLOR=#333333](F17<365,F27,IF(F17>364,F37,f12)))[/COLOR]
=if(f17>365,f32,"")please let us know your values in the following cells, so we can try to recreate your scenario:
d12 [table="width: 108"]
<tbody>[tr]
[td]7/2/2018[/td]
[/tr]
</tbody>[/table]
f12 =if(and(isblank('start here'!c6),isblank('start here'!c7),isblank('start here'!c8),isblank('start here'!c9)),"",d12)[table="width: 443"]
<tbody>[tr]
[td]
[/td]
[/tr]
</tbody>[/table]
f17
=datedif(d11,d12,"d")
f27
=if(f17<365,f22,"")
f37