IF statement with 2 variables

Copper Contributor

Can someone assist.

 

If 2<3 and 1>2, true = 2 false = 0  How do I write this IF statement ?

9 Replies
Something like:
IF(AND(2 < 3; 1 > 2); 2; 0)
I have tried and its not working
=IF(AND(E36 < E41; E38 > E36); E36; 0)
I guess the formula is working but the resul is not what you expect :)
Can u provide a sample of data with the expected result?
A	B	C	RESULT (IF(AND(B2>A2;B2<C2);B2;0))
1	2	3	2

@cbarroso 

E36=$400

E38=$2240

E41= $2410

 

E43=formula

 

so IF E36<E41 and E38>E36 YES then E43 = E36 NO then E43=0

400<2410 YES and 2240>400 YES then E43=$400

 

Further to this IF E36<E41 and E38<E36 YES then E43=E36 NO then E43=0

@kmcdermott1974 
On my side this is working

 

E36	400,00 €	400,00 €	
E38	2 240,00 €	300,00 €
E41	2 410,00 €	300,00 €	
E43 	400,00 €	0,00 €
(=IF(AND(E36<E41;E38>E36);E36;0))

 

 

Perhaps your cells are considered as TEXT and not as number, can you double check the type of the cells? In this sample what result the formula is giving you?

cbarroso_0-1638788656254.png

 

tried yours exactly still comes up with problem. even added = before IF and still problem ?!?

@kmcdermott1974take my file, maybe your excel is not in English so the formula should be wrote in another langage.

@cbarroso thanks