To clarify things a little it might help to outline the expected values given your sample data.

So for ex. given sample the value in H18 should be ?

If E5 changes from Yes to No the value in H18 should become ?

I would add that for H15, H18 you can look to shorten the existing syntax by using the SUM function

H15:
=SUM(H4:H12)

H18:
=SUM(H15,I4:I12)
pending your locale (Denmark perhaps ?) you will need to adapt the above slightly

On the subject of Location: if the locale defined in your profile is incorrect (which I suspect it is) you should update it

As I suspect you know your locale can have a significant bearing on the correct syntax, people will generally try to adapt their suggestions based on your locale... if your locale is wrong then there's a good chance you won't be able to copy & paste the suggestions into your own file without error.