IF And function

%3CLINGO-SUB%20id%3D%22lingo-sub-3027638%22%20slang%3D%22en-US%22%3EIF%20And%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3027638%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20having%20issues%20with%20the%20use%20of%20both%20%26lt%3B%3D%20and%20%26gt%3B%3D.%26nbsp%3B%20I%20can%20get%20one%20condition%20to%20work%20if%20it%20is%20equal%2C%20but%20not%20the%20other.%3C%2FP%3E%3CP%3ELine%20977%20is%20the%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3027638%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3027790%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20And%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3027790%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F263122%22%20target%3D%22_blank%22%3E%40bgbur%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(AND(ROUND(C2%2C4)%26lt%3B%3DROUND(A2%2C4)%2CROUND(C2%2C4)%26gt%3B%3DROUND(B2%2C4))%2C%22Pass%22%2C%22Fail%22)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(AND(ROUND(C2-A2%2C4)%26lt%3B%3D0%2CROUND(C2-B2%2C4)%26gt%3B%3D0)%2C%22Pass%22%2C%22Fail%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am having issues with the use of both <= and >=.  I can get one condition to work if it is equal, but not the other.

Line 977 is the issue.

1 Reply

@bgbur 

Use

 

=IF(AND(ROUND(C2,4)<=ROUND(A2,4),ROUND(C2,4)>=ROUND(B2,4)),"Pass","Fail")

 

or

 

=IF(AND(ROUND(C2-A2,4)<=0,ROUND(C2-B2,4)>=0),"Pass","Fail")