# Nested IF and IF(And Formula

Hi,

I’m trying to build a formula with nested IF and IF(AND.

The two first IF are based on a State (0 & 1) and (1 & 2). It’s working correctly.

Then I have 2 IF(AND that check the same column state and a value TF. The first IF(And is working but the second is not working.

Here is the formula :

IF({Niveau}=“0 & 1”,{TF_Decimal}{M_THNv1},IF({Niveau}=“2 & 3”,{TF_Decimal}{M_THNv2},IF(AND({Niveau}=“NEW - 0 & 1”,{TF_Decimal}<30),{TF_Decimal}*140,{TF_Decimal}*135,IF(AND({Niveau}=“NEW - 2 & 3”,{TF_Decimal}<30),{TF_Decimal}*190,{TF_Decimal}*180,0)))) & “.-”

Thanks

Hi @fdelmas,

Look at your 3rd IF statement. You have 3 arguments:

IF(AND({Niveau}=“NEW - 0 & 1”,{TF_Decimal}<30),{TF_Decimal}*140,{TF_Decimal}*135,

Your condition: AND({Niveau}=“NEW - 0 & 1”,{TF_Decimal}<30)
The result if true: {TF_Decimal}*140
The result if false: {TF_Decimal}*135

That’s one argument too many. The 3rd argument should be your next if statement.

Yes that’s correct, an now it works as expected !

Thanks