Excel Error “You’ve entered too many arguments”

Solution 1:

The error is that the inner IF has four arguments instead of three:

=IF(I13=1,K19,IF(AND(I13=2,I18>0),J22,J23,IF(AND(I13=3,I18>0),J29,J23)))
                 1                2   3   4

When you get the error, Excel 365 outlines in color the bad function (although it could be done somewhat better):

enter image description here