Excel 2013

Problem Formula:

=IF(AND($E4="R",F4="P"),15,IF(AND($E4="S",F4=P),11))+IF(AND($E5="R",F5="P"),15,IF(AND($E5="S"),11))
Works fine when R is entered into E4

Receives #NAME? when S is entered into E4

But Line 5 works fine: R give enters 15 while S enters11

If I change the Formula for line 4 so it is the same as line 5 Excel does not accept the formula

=IF(AND($E4="R",F4="P"),15,IF(AND($E4="S",11))+IF(AND($E5="R",F5="P"),15,IF(AND($E5="S"),11))
Solution (Found my error):

=IF(AND($E4="R",F4="P"),15,IF(AND($E4="S"),11))+IF(AND($E5="R",F5="P"),15,IF(AND($E5="S"),11))
Do not know how to do this as a SUM function.

Also if S is entered in Column E and nothing in Columns F,G,H,..... It still adds 11 to the Total instead of 0 (Works OK with R in Column E; 0 if Columns F,G,H are empty and 15 if Columns have P)

Required:
0 if R or S is in Column E and no entry in Columns F,G,H,.... ;
15 if R is in Column E and P is in Columns F,G,H,...;
11 if S is in Column E and P is in Columns F,G,H,...;
4 if R is in Column E and A is in Columns F,G,H,...;

This formula is entered in Cell 30, 60, 90, ... in Columns F,G,H, ....

Thank you.