Hi all,
I have put together a World Cup spreadsheet which I can't get to work 100% correctly and I'm struggling to sort it out.
I have two columns which are the actual result of the match, plus two columns which are the users guess. What I want to do is compare the result against prediction and award points as follows:
1 point for getting the result correct, plus 1 point for getting each team's score correct. This gives the possibility of 0,1,2, or 3 points.
I've written an if statement on the cell that gives the points, which works fine for 0, 1, or 3 points, but I can't seem to work out how to get 2 points in there. I may have over complicated it in the way I've approached it, but would be grateful for some advice. The code follows and I've formatted it to make it more readable. I know I need to change the OR statement but when I tried, it told me I had gone to too many levels of embedded-ness.
Any help gratefully received.
Marc
I have put together a World Cup spreadsheet which I can't get to work 100% correctly and I'm struggling to sort it out.
I have two columns which are the actual result of the match, plus two columns which are the users guess. What I want to do is compare the result against prediction and award points as follows:
1 point for getting the result correct, plus 1 point for getting each team's score correct. This gives the possibility of 0,1,2, or 3 points.
I've written an if statement on the cell that gives the points, which works fine for 0, 1, or 3 points, but I can't seem to work out how to get 2 points in there. I may have over complicated it in the way I've approached it, but would be grateful for some advice. The code follows and I've formatted it to make it more readable. I know I need to change the OR statement but when I tried, it told me I had gone to too many levels of embedded-ness.
Code:
=(IF(AND($C7=" ",$E7=" "),0,
IF(AND($C7=F7,$E7=H7),3,
IF(OR($C7=F7,$E7=H7),1,
IF(AND($C7>$E7,F7>H7),1,
IF(AND($C7=$E7,F7=H7),1,
IF(AND($C7<$E7,F7<H7),1,
0)))))))
Any help gratefully received.
Marc