If / OR statement

WillSTARK

New Member
Joined
Jan 25, 2017
Messages
13
Hi,

I have various columns including column F, J (both have dates values or no value/no dates) and U (which has a text value)

I want to say that if at least one of the columns meet my criteria then, it shows the row as Active / Inactive. However, the function below only gives me inactive even when it should be sometimes shown as Active.

=IF(OR(F2 <TODAY(),or((J2<TODAY()),or(U2 = "Terminated"))),"Inactive","Active")

Do you have any idea / explanations?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi, your logical tests should probably all be within one OR() function. i.e.

=IF(OR(F2 < TODAY(),JJ2 < TODAY(),U2="Terminated"),"Inactive","Active")<today(),jj2<today(),u2="terminated"),"inactive","active")< html=""></today(),jj2<today(),u2="terminated"),"inactive","active")<>
 
Last edited:
Upvote 0
Hi,

Thks for the suggestion. It sill shows Inactive when it should be Active. It does so when the rows are blanks. Columns F and J are dates, so perhaps it considers a blank cell as 0 which is < to today's date. I tried this Formula adding <>"" but it does not work. It might consider it as a text string and not a number.

=IF(OR(and(F2<TODAY(),<>""),and(J2<TODAY(),<>""),U2="Terminated"),"Inactive","Active")

Example

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
FJUExpected
TerminatedInactive
Inactive
TerminatedInactive
Inactive
Active
Inactive

<colgroup><col style="width: 120px"><col width="120"><col width="120"><col width="120"><col width="120"></colgroup><tbody>
[TD="align: right"]1[/TD]
[TD="align: right"]12/12/2012[/TD]

[TD="align: right"]2[/TD]
[TD="align: right"]12/12/2012[/TD]
[TD="align: right"]10/10/2013[/TD]

[TD="align: right"]3[/TD]

[TD="align: right"]4[/TD]
[TD="align: right"]12/12/2012[/TD]

[TD="align: right"]5[/TD]

[TD="align: right"]6[/TD]
[TD="align: right"]12/12/2012[/TD]

</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top