Sum if

[Solved/Closed]
Report
-
Hello,
Pls help me find the formula for below situation

I am trying to sum up 4 when a cell in the Column A contains End with XX7.
Otherwise its sum with 11 in same.
Example 1:
[Column A] [Column B]
400 sum+11 =411
510 sum+11 =521 if
477 sum+4 =480
476 sum+11 =477
Or
Example 2:
[Column A]
A1= 100
A2= 111 sum(A1+11)
A3= 123 sum(A2+11)
A4= 134 sum(A3+11)
A5= 145 sum(A4+11)
A6= 156 sum(A5+11)
A7= 160 sum(A6+5)
A8= 171 sum(A7+11)
The resulting formula should output "0 to 6".