ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiple Conditions within an IF Function (https://www.excelbanter.com/excel-worksheet-functions/113269-multiple-conditions-within-if-function.html)

Will

Multiple Conditions within an IF Function
 
Hey everyone,

Just wondering if anyone knows if it is possible to have the following style
of formula with two conditions before the true/false part eg.

IF(H2<=365 and F20,F2,"")
IF(H2<=365 condition 1, F20 condition 2,F2,"")

What I am trying to do is have a function which tests for two different
conditions before returning a value. So far I have not had much luck.

If anyone knows the best way to do this your help would be greatly
appreciated.

Cheers


RagDyeR

Multiple Conditions within an IF Function
 
Try this:

IF(AND(H2<=365,F20),F2,"")

Both conditions must be TRUE for the contents of F2 to be displayed.
If either is FALSE, the cell containing this formula appears empty.

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"will" wrote in message
...
Hey everyone,

Just wondering if anyone knows if it is possible to have the following
style
of formula with two conditions before the true/false part eg.

IF(H2<=365 and F20,F2,"")
IF(H2<=365 condition 1, F20 condition 2,F2,"")

What I am trying to do is have a function which tests for two different
conditions before returning a value. So far I have not had much luck.

If anyone knows the best way to do this your help would be greatly
appreciated.

Cheers



steveK

Multiple Conditions within an IF Function
 

RagDyer wrote:
Try this:

IF(AND(H2<=365,F20),F2,"")
I think this is also covered in http://www.cpearson.com/excel.htm




All times are GMT +1. The time now is 08:56 AM.

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