Add two IF statements together

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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)
 
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)
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top