This works except when both cells are blank.

S

StargateFan

Every once in a blue moon I get to work on a personal project. This
is for track of some scores. I modified the formula from some code in
the ng archives but haven't figured out how to take care of when both
cells are blank.

In E2:
=IF($C2>$D2,"YOU WON!!",IF($C2<$D2,"You Lost ... :eek:(","Tied!"))

this works great unless both C2 and D2 are blank when I get "Tied!"
whereas should be blank. How do we accommodate for blank cells in the
above formula?

Thanks! :eek:D
 
D

Dave Peterson

=if(count($c2:$d2)<2,"not enough scores", ...

You could use =counta() instead if you can type strings in those cells.
 
D

Don Guillett

Try this.
=IF(AND(ISNUMBER(C2),ISNUMBER(D2)),IF(C2=D2,"tied",IF(C2>D2,"Won","lost")),"")
 
S

StargateFan

Try this.
=IF(AND(ISNUMBER(C2),ISNUMBER(D2)),IF(C2=D2,"tied",IF(C2>D2,"Won","lost")),"")

Thanks, this seem to be working perfectly!
'course, I had to add all the 'emotion' back in to the text strings
<g>:

=IF(AND(ISNUMBER($C2),ISNUMBER($D2)),IF($C2=D2,"Tied!",IF($C2>$D2,"YOU
WON!","You lost :eek:(")),"")

Thanks! :eek:D
 
S

StargateFan

=if(count($c2:$d2)<2,"not enough scores", ...

You could use =counta() instead if you can type strings in those cells.

Thank you. I'll try this out, too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top