ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nested if statements creating a blank cell (https://www.excelbanter.com/excel-worksheet-functions/449790-nested-if-statements-creating-blank-cell.html)

ruthhicks999

Nested if statements creating a blank cell
 
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(H1285.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

Ron Rosenfeld[_2_]

Nested if statements creating a blank cell
 
On Sun, 9 Feb 2014 22:11:54 +0000, ruthhicks999 wrote:


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(H1285.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 the <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





All times are GMT +1. The time now is 09:53 AM.

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