Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dubbs
 
Posts: n/a
Default Add two IF statements together

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)


  #2   Report Post  
Myrna Larson
 
Posts: n/a
Default

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)


On Tue, 14 Jun 2005 10:07:07 -0700, "Dubbs"
wrote:

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)


  #3   Report Post  
Dubbs
 
Posts: n/a
Default

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)

"Dubbs" wrote:

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)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
More than 7 IF statements in one arguement smithers2002 Excel Worksheet Functions 9 April 21st 05 01:59 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
2 If Statements between 2 values Q John Excel Worksheet Functions 4 December 13th 04 03:37 PM
Macro to find and delete all FALSE statements Woody13 Excel Discussion (Misc queries) 3 December 8th 04 11:16 PM
If statements Mark Excel Worksheet Functions 3 November 2nd 04 08:39 PM


All times are GMT +1. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"