Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UDFunctions and nested If-the-else statements | Excel Worksheet Functions | |||
"IF Statements in Microsoft Excel | Excel Discussion (Misc queries) | |||
Linking two IF statements together | Excel Discussion (Misc queries) | |||
Logical ELSE statements | Excel Discussion (Misc queries) | |||
Nested IF statements | Excel Worksheet Functions |