Trouble with null values

  • Thread starter Tazzy via OfficeKB.com
  • Start date
T

Tazzy via OfficeKB.com

Hi all,

Can someone please help me with a problem I'm having using an IF statement
that refers to cells that may have a null value.

I've created a sheet for recording student exam results. Column D shows how
many major errors have been made, Column E shows how many minor errors have
been made, Column F gives a P or F depending on the amount of errors made; 0
major and 4 or less minor are a pass, 1 major or 5 or more minor are a fail.
The formula looks like this;

=IF(D3>=1,"F",IF(E3>4,"F","P"))

and works fine.

However if columns D and E are empty, then I don't want anything displayed in
column F, at the moment all cells in column F are displaying a P. I think
that it may involve more nested IFs for the formula but I seem to be going
around in circles.

Hope someone can help sort this for me,

Thanks,
Tazzy
 
S

Stefi

=IF(OR(ISBLANK(D3),ISBLANK(E3)),"",IF(D3>=1,"F",IF(E3>4,"F","P")))

Regards,
Stefi


„Tazzy via OfficeKB.com†ezt írta:
 
B

Bob Phillips

=IF(AND(D3="",E3=""),"",IF(D3>=1,"F",IF(E3>4,"F","P")))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Gav123

Or another way...

=IF(D3="","",IF(E3="","",IF(D3>=1,"F",IF(E3>4,"F","P"))))

Hope this helps,

Gav.
 
T

Tazzy via OfficeKB.com

Bob/Stefi,

Thank you both for such a quick answer, have saved both of your formulae in
my ever growing list. Spreadsheet now looks the way I want it to.

Kind Reagrds,
Tazzy
 
S

Stefi

You are welcome! Thanks for the feedback!
Stefi

„Tazzy via OfficeKB.com†ezt írta:
 

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