# If with three possible outcomes

#### Sojek

##### New member
Hi,

Me and my colleague bet football games, it looks like in the picture attached.

Our rules are simple:

• correct score = 3 points
• Someone guess the winner but with no correct score: 1 points
• No guess: 0 points

What I've figured out so far is how to add 3 points for a correct score:

Code:
``=IF(AND(D4=G4,E4=H4),3,0)``

The sum of all points would be located in cell G6 and I6 respectively.
I'm not sure how to modify the IF formula to include 1 and 0 points awards.

Any help would be appreciated.

Regards,
Sojek

#### bgoree09

##### New member
Good morning,

=IF(AND(D4=G4,E4=H4),3,IF(OR(AND(D4>E4,G4>H4),AND(D4<E4,G4<H4)),1,0))

Hope this helps,

#### Sojek

##### New member
Hi,

There is one more thing I'm struggling with.
For some reason my formula thinks that cells C4 and D4 are equal to goalless draw so the outcome for cell H4 is 1 (should be 0).

What additional formula should I implement into it?

Regards,
Tom

#### bgoree09

##### New member
Hello again,

Just wrap it in an IF function:

IF ( C4 = "", 0 , ** FORMULA ** ).

I suppose you could use AND ( C4 = "", D4 = ""), but I'm assuming if one is blank they both are.

Best of luck,