ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional formula based on 2 pre-conditions (https://www.excelbanter.com/excel-worksheet-functions/229703-conditional-formula-based-2-pre-conditions.html)

PSmith

Conditional formula based on 2 pre-conditions
 
Can anyone tell me what is wrong with the following formula? I only want the
division part of the formula to be executed if the previous two conditions
are both satisfied, if either one isn't satisfied, then I'd like it to return
the "--" value but I can't seem to get the parentheses right. Many thanks.

=IF(D57<"NA"& IF(D220,D22/D57,"--"))

Glenn

Conditional formula based on 2 pre-conditions
 
PSmith wrote:
Can anyone tell me what is wrong with the following formula? I only want the
division part of the formula to be executed if the previous two conditions
are both satisfied, if either one isn't satisfied, then I'd like it to return
the "--" value but I can't seem to get the parentheses right. Many thanks.

=IF(D57<"NA"& IF(D220,D22/D57,"--"))



In the help file, search for "Logical Functions" and then select "AND worksheet
function".

Bernard Liengme[_3_]

Conditional formula based on 2 pre-conditions
 
=IF(AND(D57<"NA", D220),D22/D57,"--")

but if you have #N/A in D57 from a formula then
=IF(AND(NOT(ISNA(D57), D220),D22/D57,"--")

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"PSmith" wrote in message
...
Can anyone tell me what is wrong with the following formula? I only want
the
division part of the formula to be executed if the previous two conditions
are both satisfied, if either one isn't satisfied, then I'd like it to
return
the "--" value but I can't seem to get the parentheses right. Many thanks.

=IF(D57<"NA"& IF(D220,D22/D57,"--"))




John[_22_]

Conditional formula based on 2 pre-conditions
 
Hi P. Smith
Try it this way =IF(AND(D57<"NA",D220),D22/D57,"--")
HTH
John
"PSmith" wrote in message
...
Can anyone tell me what is wrong with the following formula? I only want the
division part of the formula to be executed if the previous two conditions
are both satisfied, if either one isn't satisfied, then I'd like it to return
the "--" value but I can't seem to get the parentheses right. Many thanks.

=IF(D57<"NA"& IF(D220,D22/D57,"--"))



PSmith

Conditional formula based on 2 pre-conditions
 
Thank you very much Bernard, I appreciate the quick reply!

"PSmith" wrote:

Can anyone tell me what is wrong with the following formula? I only want the
division part of the formula to be executed if the previous two conditions
are both satisfied, if either one isn't satisfied, then I'd like it to return
the "--" value but I can't seem to get the parentheses right. Many thanks.

=IF(D57<"NA"& IF(D220,D22/D57,"--"))



All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com