Add two IF statements together

D

Dubbs

I am trying to add these two together but can't get it to work.

=IF(AM11="Put"&AN11<$K$2;AN11-$K$2;$K$2-AN11)
=IF(AM11="Call"&AN11>$K$2;$K$2-AN11;AN11-$K$2)
 
M

Myrna Larson

I assume by the ampersand you mean "AND". There's a function for that.
Ampersand concatenates text. Assuming AM11 will contain only Put or Call, and
no other values, and the result is to be negative for Puts and positive for
Calls,

=IF(AM11="Put",-ABS(AN11-$K$2),ABS(AN11-$K$2))

or

=ABS(AN11-$K$2)*IF(AM11="Put",-1,1)
 
D

Dubbs

I am not sure why it shows my formulas like that. It should read

=IF(AM11="Put"&AN11<$K2$;AN11-$K$2;$K$2-AN11)

and

=IF(AM11="Call"&AN11>$K$2;$K$2-AN11;AN11-$K$2)
 
Top