Dead Men Walking

dMw Chit Chat => The Beer Bar => Technology Section => Topic started by: delankster on February 08, 2010, 04:37:07 PM

Title: Excel Problem
Post by: delankster on February 08, 2010, 04:37:07 PM
have been playing with excel trying to get it to mark a football competition that i run at work.

you predict the scores of 10 games eg.. 2-1 etc..... if you get the result correct you score a point, if you get the correct score you get another 2 points (3 in total) the one with the most points wins.

managed to get it to mark the entries with the if command:  

=IF(AND(C22=E22,D22=F22),3,IF(AND(C22=D22,E22=F22),1,IF(AND(C22>D22,E22>F22),1,IF(AND(D22>C22,F22>E22),1,0))))

with C22 being the home predicted score and D22 the away predicted scores and E22 the actual Home score and F22 the Actual Away scores

if that makes sense ?

anyhow the problem is that each week i get a different amount of entries and if there is any blank sheets the code doesn't pick it up and marks them all as predicted draws.

any ideas as a way round this ?
Title: Excel Problem
Post by: Luminance on February 08, 2010, 05:35:58 PM
prefill the entries with an - or an X ?
Title: Excel Problem
Post by: Benny on February 08, 2010, 08:11:15 PM
Isn't there a way with isnumber to check the field is valid before hand?

Can't quite remember but hit 'help' and search for 'check for number' or something like that.
Title: Excel Problem
Post by: delankster on February 09, 2010, 09:45:31 AM
Quote from: Luminance;303638prefill the entries with an - or an X ?

thats the way i was getting round it just thought there would be a way to work it into the command.

Quote from: Benny;303654Isn't there a way with isnumber to check the field is valid before hand?

Can't quite remember but hit 'help' and search for 'check for number' or something like that.


cheers benny will have a look into the isnumber command :)
Title: Excel Problem
Post by: Benny on February 09, 2010, 12:21:08 PM
so you could use,

the ISBLANK function returns the logical value TRUE if the value argument is a reference to an empty cell; otherwise it returns FALSE.


=IF(ISBLANK(cell),"Your formula",)

or something