Trying to get a blank cell in soccer stats

  • Thread starter Thread starter guie
  • Start date Start date
G

guie

I am having trouble in my soccer stats I show the score with the first
score of the team above in the sheet and the second number is the score
of the other team. For the score I have a formula that will say WON OR
LOST according to the score. But when I get to a game that is tied it
show a tie but if the cell are blank it still wants to show a tie how
can I changed this. File is attached but here is the formula::::::
=IF(A7>B7,"WON", IF(A7<B7,"LOST",IF(A7=B7,"TIE")))

File Attached: http://www.exceltip.com/forum/attachment.php?postid=282921 (book1.xls)
 
Hi guie,

Try this:

=IF(OR(A7="",B7=""),"",IF(A7>B7,"WON", IF(A7<B7,"LOST",IF
(AND(A7=B7,A7<>"",B7<>""),"TIE",""))))

This is a little more robust than you asked for. The
reason it was doing that is because a blank cell will be
equal to another blank cell.

Biff
 
Biff said:
=IF(OR(A7="",B7=""),"",IF(A7>B7,"WON", IF(A7<B7,"LOST",IF
(AND(A7=B7,A7<>"",B7<>""),"TIE",""))))

This is a little more robust than you asked for. The
reason it was doing that is because a blank cell will be
equal to another blank cell.
....

No, the overly complex AND(..) term adds nothing other than processing time.
The original OR(..) condition excludes *ALL* situations in which *EITHER* A7
or B7 or *BOTH* are effectively blank. If you don't agree, provide some A7
and B7 values which show that it's necessary.

Here's an alternative.

=IF(AND(ISNUMBER(A7),ISNUMBER(B7)),CHOOSE(2+SIGN(A7-B7),
"LOST","TIED","WON"),"")
 
Yeah, you're right!

The original OR? There was no OR. Actually, I added that
at the last second. I had already included the IF AND and
without the OR it would have returned WON as soon as an
entry was made in A7.

Biff
 
Back
Top