Hello there; I am trying to write an IF statement. The calculations in the excel sheet will be done through several steps.

First, there will be entries in several cells. Whatever the entries in these cells, the outputs in cells G2 and H2 will ALWAYS range between 0.0 and 100.00 because they are percentage numbers. Until this point, I have no difficulties in the formulas.

I will then use the values in G2 and H2 to build an IF statements in cells J2. The value in cell J2 is generated based on the following:

IF G2<=25 and H2>=75 and H2>G2 THEN PRINT “FAIL”

IF H2<=25 and G2>=75 and G2>H2 THEN PRINT “PASS”NOTE 1: I am requiring "AND" not "OR", which means I need ALL the conditions to be satisfied.

NOTE 2: We should ignore any other case.

NOTE 3: We may use the word “suspicious” for any other output, however, it is not necessary.If I am right, here are the possible outputs for cells G2 and H2 if I did not miss any (remember: all values in G and H are percentages):

G H

10 10

10 25

10 80 OPTIMUM VALUE WHICH SHOULD PRINT “FAIL”

30 10

30 30

30 80

80 10 OPTIMUM VALUE WHICH SHOULD PRINT “PASS”

80 30

80 80I have tried several combinations and always failed to build the IF STATEMENT. Please, help me if you can.

Regards

Try this: =IF(AND( G10<=25, H10>=75, H10>G10),"FAIL",IF(AND(H10<=25, G10>=75, G10>H10),"PASS",""))

MIKE

Thanx...I will get back to you later, however, It may take me longer than usual because I found some mistakes in the formulas I have. I must fix them first.

YAHOOOOOOOOOOO.... Thanx a lot... After I fixed the formulas, everything worked excellent. What's funny is that I have built the same formula you built, but because I had wrong calculations in the other cells, it never worked out. your formula actually made me doubt my calculations.

Big thanks to you brother..

Ask Your Question

Weekly Poll

Do you agree with Google's decision to shut down Google+?

Discuss in The Lounge

Poll History