ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need help on formula (https://www.excelbanter.com/excel-worksheet-functions/74810-need-help-formula.html)

Param

Need help on formula
 
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

Max

Need help on formula
 
One way, try:
=IF(ISTEXT(D6),"",IF(D6=40,"Pass",IF(D6=1,"Fail" ,IF(D6=0,""))))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Param" wrote in message
...
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




Dav

Need help on formula
 

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(ISNUMBE R(D6),D6=1),"Fail",""))

Perhaps

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

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=518137


paul

Need help on formula
 
type0 instead of-
--
paul
remove nospam for email addy!



"Param" wrote:

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



All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com