Need help on formula

P

Param

I create function to read as:

=IF(D6>=40,"Pass",IF(D6>=1,"Fail",IF(D6=0,"")))

my question, when I enter mark 40 and above it appear 'Pass" - ok
when I enter below 40 it appear 'Fail' - ok
but if I enter - (still show 'Pass')

how to overcome like when I enter 0 - become blank
 
D

Dav

I would probably write the formual differently because this is
longwinded, but - is text , check it is a number in your logic

try

=IF(AND(ISNUMBER(D6),D6>=40),"Pass",IF(AND(ISNUMBER(D6),D6>=1),"Fail",""))

Perhaps

=IF(D6="-","",IF(D6>=40,"Pass","Fail"))

Regards

Dav
 
Top