Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default OR'ing to IF Statements

I am trying to "OR" these together.

=IF(AND(H5="sell";K5<=D5);(K5-D5)*L5*100;(K5-D5)*L5*100)

=IF(AND(H6="buy";K6<=C6);(C6-K6)*L6*100;(C6-K6)*L6*100)

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default OR'ing to IF Statements

"carl" wrote:
I am trying to "OR" these together.
=IF(AND(H5="sell";K5<=D5);(K5-D5)*L5*100;(K5-D5)*L5*100)
=IF(AND(H6="buy";K6<=C6);(C6-K6)*L6*100;(C6-K6)*L6*100)


To begin with, you comma (","), not semicolon (";") as a
separator.

I do not understand what it is you want to "OR" and what
outcome you are looking for when the OR() returns true v.
false. I suggest that you start by writing your requirements
in English, something like:

if "this condition" or "that condition", then "this", else "that"

My suspicion is that you do not want "OR" at all, but perhaps
nested "IFs", for example:

if "this condition", then "this"
else if "that condition", then "that", else "another"

Based on that assumption, I wonder if the following is the
solution you are looking for:

=IF(H5="sell", (K5-D5)*L5*100, IF(H6="buy", (C6-K6)*L6*100, ""))
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
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
"IF Statements in Microsoft Excel Kathy Excel Discussion (Misc queries) 5 December 5th 05 05:02 PM
Linking two IF statements together trixma Excel Discussion (Misc queries) 2 September 29th 05 06:07 AM
Logical ELSE statements Ruth Excel Discussion (Misc queries) 2 June 23rd 05 03:23 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM


All times are GMT +1. The time now is 09:32 AM.

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"