ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If statement with OR (https://www.excelbanter.com/excel-programming/368290-if-statement.html)

trobinson

If statement with OR
 
Hello,
I need an statement that will let me put some values in a cell based on
a comparison of a month in one cell. I have that part correct, however
I would also like to look to see if another criteria is met. For
instance, the month falls between a range of begin date and end date.

How can I do that with an if statement?

Thanks

=IF(OR(MONTH(Sheet2!$D$4)=Sheet4!J2,Sheet2!$I$4/Sheet2!$J$4,0),
IFMonth(Sheet2!$d$4) Sheet4!J2,Sheet2!$i$4/Sheet2!$J$4,0))


ducky

If statement with OR
 

however I would also like to look to see if another criteria is met. For
instance, the month falls between a range of begin date and end date.


It sounds like you need to look into the AND function rather than OR.

AR


Tom Ogilvy

If statement with OR
 
=if(And(A1=B1,A1<=C1),"Between","Not Between")

--
Regards,
Tom Ogilvy


"trobinson" wrote:

Hello,
I need an statement that will let me put some values in a cell based on
a comparison of a month in one cell. I have that part correct, however
I would also like to look to see if another criteria is met. For
instance, the month falls between a range of begin date and end date.

How can I do that with an if statement?

Thanks

=IF(OR(MONTH(Sheet2!$D$4)=Sheet4!J2,Sheet2!$I$4/Sheet2!$J$4,0),
IFMonth(Sheet2!$d$4) Sheet4!J2,Sheet2!$i$4/Sheet2!$J$4,0))




All times are GMT +1. The time now is 05:46 PM.

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