Nested if statements creating a blank cell

R

ruthhicks999

I have a Cell H130 which I want to say "Pass" if the value in H129 is <
5.07 and "Fail" it is over that. I have managed to do that quite easil
using
=IF(H129<=5.07,"Pass","Fail")

The issue is that I need cell H130 to be blank if cell H129 is blank.

Cell H129 is itself a formula =H128

I have tried =IF(H128<=5.07,"Pass",IF(H128>5.07,"Fail","")) but if H12
is blank it still puts Pass into the cell.

Hsve tried other combinations including =If(H129=” “,
“,if(H129<=5.07,”Pass”,”Fail”)) but I cannot get it to work. An
suggestions pleas
 
R

Ron Rosenfeld

I have a Cell H130 which I want to say "Pass" if the value in H129 is <=
5.07 and "Fail" it is over that. I have managed to do that quite easily
using
=IF(H129<=5.07,"Pass","Fail")

The issue is that I need cell H130 to be blank if cell H129 is blank.

Cell H129 is itself a formula =H128

I have tried =IF(H128<=5.07,"Pass",IF(H128>5.07,"Fail","")) but if H129
is blank it still puts Pass into the cell.

Hsve tried other combinations including =If(H129=” “,”
“,if(H129<=5.07,”Pass”,”Fail”)) but I cannot get it to work. Any
suggestions please


=If(H129=” “,”“,if(H129<=5.07,”Pass”,”Fail”))

” “ is a space surrounded by right and left double quotation marks.
That is not the same as a blank, which can be expressed as a null string or two "regular" quotation marks together.

Seems very close

If you want to test if H129 is blank, H129=“ ” is not the same as being blank. There are three characters there: <left double quote> <space> <right double quote>

If you want to test if a H129 is blank, then use either a null string: "" (two "normal" quote marks with NO space); or use the ISBLANK function.

But H129 will not be BLANK if it contains the formula =H128. So the first question is what is in H128? If H128 is blank, and H129 contains =H128; then H129 will evaluate to 0 which. But if you are seeing nothing in H129, there must be something in H128; test for that and you will have a working formula.

For example:

=if(h128="","",if(h128<=5.07,"Pass","Fail"))

might work, depending on what is really in H128
 

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