View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JockW JockW is offline
external usenet poster
 
Posts: 32
Default IF, AND, BUT and ON-THE-OTHER-HAND formula :)

Hi Trevor,
Thanks for getting back. All solutions supplied (except your modified one
and Harlans - neither tested) had the exactly the same outcome if non numeric
characters (and even if cells were left blank) were used in that, because the
formula took <blank and <blank as being the same, it awarded 3 points. If
no actual score was entered, then 5 points were clocked up as all criteria
were met.
I tried to get around the issue by putting =IF( at the beginning so it
ignored blank cells. This worked up to a point. I finally ran with a slightly
modified version of David Biddulphs proposal:
=(IF(AND(F7="",G7=""),"",3*(SIGN(F7-G7)=SIGN($D7-$E7))+(F7=$D7)+(G7=$E7)))
Thank you all for your time and effort - I just need to predict the corect
scores now so I can retire.....lol
--
tia


"Trevor Shuttleworth" wrote:

You said there'd be numbers ...

OK, users can't be trusted.

Try:

=IF(OR(NOT(ISNUMBER(A10)),NOT(ISNUMBER(B10))),"nul l
point",IF(OR(AND($A$2$B$2,A10B10),AND($A$2<$B$2, A10<B10),AND($A$2=$B$2,A10=B10)),3,0)+--($A$2=A10)+--($B$2=B10))

Change the text to meet your requirements ... "cheat" maybe ?

Did the other solutions have similar outcomes when you forecast rubbish ?

Regards

Trevor


"Jock" wrote in message
...
Thanks Trevor, brilliant up to a point.
A4 and B4 can be absolutely anything (I.E.Z and Z) and the formula gives 3
points if the actual score was a draw. I discovered this when one entry
had
no score entered for a particular match (which was a draw) and the formula
returned 3 for a game with no prediction.
Is there a work around?
--
Traa Dy Liooar

Jock


"Trevor Shuttleworth" wrote:

=IF(OR(AND($A$2$B$2,A4B4),AND($A$2<$B$2,A4<B4),A ND($A$2=$B$2,A4=B4)),3,0)+--($A$2=A4)+--($B$2=B4)

Assume Actual Home and Away scores are an A2 and B2 and predicted scores
are
in A4 and B4 down

Regards

Trevor


"JockW" wrote in message
...
I'm unsure if this is do-able, but I know some of you will relish the
challenge....
I'm creating a spreadsheet showing points gained from predicting soccer
scores.
For the correct result (ie home win, away win or draw) - 3 points,
For getting home team score correct - 1 point,
For getting away team score correct - 1 point.
Therefore, the max possible points per game would be 5.
So, for instance:

Home Away
3 1

john's prediction
2 1 4 points - 3 for the result and 1 for the
correct
away score
Jane's prediction
1 0 3 points for the correct result
Jack's prediction
0 3 0 points

I think there may be too many variables but any/all help greatly
appreciated.
--
tia