Sum of an IF/AND statement

Amonsul

New Member
Joined
Dec 7, 2017
Messages
2
I am having a problem with my formula. I have a wrestling record book that I am trying to get points for. Example if a person won a match with a pin I want them to get 4 points. If they Lose a match they lose .5 points. I want to be able to add up points for Wins/Loses and How they won. The problem is the If/and statements do not add up the points.

I get the 3.5 for the Win/Loss but it doesn't add the the 4 points for the Pins. Can someone help?

WeightWrestlerOpponentSchoolResultHowRecordPinsPoints
OP1WPin2-12
Op2WPin
OP3LDec

<tbody>
</tbody>

So my code in I2 is {=SUM(IF((E2:E100="W"),2,0),IF((E2:E100="L"),-0.5,0),IF(AND(E2:E100="W",F2:F100="Pin"),2,0),IF(AND(E2:E100="W",F2:F100="TF"),1,0))}
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi, welcome to the forum!

Here is one option that you can try in I2

=SUMPRODUCT(COUNTIFS(E2:E100,{"W","L"},F2:F100,{"Pin";"<>Pin"}),{4,-0.5;2,-0.5})
 
Upvote 0
Hi, welcome to the forum!

Here is one option that you can try in I2

=SUMPRODUCT(COUNTIFS(E2:E100,{"W","L"},F2:F100,{"Pin";"<>Pin"}),{4,-0.5;2,-0.5})

Thank you that worked great! I am not quite sure what is going on here. How would I expand it? I also need to add in things like a Win in Result but a Dec in How. The Win would be worth 2 points and the Dec would be worth 1 point. So in the example below should have the points of 10.5.

6 points for W
4 points for Pin
1 points for Dec
-.5 points for L

WeightWrestlerOpponentSchoolResultHowRecordPinsPoints
OP1WPin2-12
Op2WPin
OP3

OP4
L

W
Dec

Dec

<tbody>
</tbody>
 
Upvote 0
I also need to add in things like a Win in Result but a Dec in How.

Hi, I don't understand your latest description of the points, but here is a suggestion that gives you a lot of flexibility and maintainability.

Here you would make a table of all the possible outcomes (cells K2:M5 in this example) and assign the points you want to award for each outcome and use as below.


Excel 2013/2016
EFGHIJKLM
1ResultHowRecordPinsPointsResultHowPoints
2WPin42737215.5WPin6
3WPinWDec4
4LDecLPin-0.5
5LDec-0.5
6WDec
Sheet1
Cell Formulas
RangeFormula
I2=SUMPRODUCT(COUNTIFS(E:E,K2:K5,F:F,L2:L5),M2:M5)
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,981
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top