You have a multiple errors with your parentheses. Here is your code broken up into separate lines for each argument. I have added line numbers for ease of reference. Remember, the IF function takes three arguments: condition, true-result, and false-result.
- IF(B3<50,
- (N3*$C$57)+$C$51+$C$52+$C$55),
- IF((AND(B3>51,B3<100),
-
(N3*$C$57)+$C$51+$C$53+$C$55),
1. IF(B3>101,
1.
1. ```sql
(N3*$C$57+$C$54+$C$55),
-
0)
Line 1 is the start of IF#1. It contains the 1st argument of IF#1.
Line 2 contains the 2nd argument for IF#1. The final right parenthesis is unbalanced. It actually matches the left parenthesis in line 1 which means IF#1 has only two arguments when it needs three.
Once we remove the offending parenthesis, line 3 starts the 3rd argument to IF#1. This argument is another IF function, IF#2, and line 3 contains the 1st argument of IF#2 Notice that this line contains a double left parenthesis. The first left parenthesis is correct; it is the standard one between the function name and the arguments. The second left parenthesis is incorrect. Its presence causes both lines 3 and 4 to be considered part of the 1st argument of IF#2. Obviously the 1st argument should just be the AND function. So we eliminate the second left parenthesis on line 3. Now, line 3 contains only the 1st argument of IF#2.
Line 4 now has the same problem as described for line 2 and we eliminate the final right parenthesis. Now line 4 contains the 2nd argument to IF#2.
Line 5 now contains the 3rd argument to IF#2. This argument is another IF function, IF#3, and line 5 contains the 1st argument of IF#3.
Line 6 contains the 2nd argument of IF#3. While not incorrect, the parenthesis on this line are completely unnecessary.
Line 7 contains the 3rd argument of IF#3 and the right parenthesis that terminates IF#3
Now you are missing the two right parentheses needed to terminate IF#2 and IF#1, in that order.
Once I fixed these problems, the formula was accepted.
Also note that all your parentheses surrounding the multiplication terms are unnecessary but not incorrect. However, they do seem to have sufficiently confused you to cause the other problems.