Combine IF function with OR function to allow multiple conditions

I worked with but now I need to check multiple conditions on a column =IF(L2="","Active",IF(K2<=I2,"On Time",IF(K2>I2,"Late")))

F

I tried the function OR

=IF(OR(F2="Scheduled",F2="3 Hours 30 Minutes",IF(L2="","Active",IF(K2<=I2,"On Time",IF(K2>I2,"Late")))),"Other")

      

My details

enter image description here

How to check if only service = F2 = "Scheduled", F2 = "3 hours 30 minutes", or if L2 is empty, still check if it is late or enabled?

+3


source to share


4 answers


Maybe this?

   =IF(OR(F2="Scheduled",F2="3 Hours 30 Minutes", L2=""),"Active",
        IF(K2<=I2, "On Time", IF(K2>I2, "Late","Other")))

      



But this can probably be simplified, because the case of the "Other" seems impossible:

=IF(OR(F2="Scheduled",F2="3 Hours 30 Minutes", L2=""),"Active",
    IF(K2<=I2, "On Time", "Late"))

      

+3


source


If I interpret the logical flow correctly,

=IF(OR(F2={"Scheduled", "3 Hours 30 Minutes"}, L2=""), "Active", IF(K2<=I2, "On Time", "Late"))

      

If F2 is scheduled OR F2 is 3 hours 30 minutes or L2 is empty then Active .
If none of these conditions apply, look at the dates in I2 and K2. If K2 is earlier or coincides with I2, On. Time is otherwise Late .



There is no other.

enter image description here

For all intents and purposes, this formula is identical to the one previously published by ASH .

+3


source


There is something wrong with the logic here. This is your final definition: -

since L2 is not empty, then it must be either Late or On Time, which in this case its time, if POD time is empty, then the job is still active, if the time processing time has a date and time, then the job is complete so I wanted to know if it's on time or late

The formula =IF(L2,IF(K2<=I2, "On Time", "Late"),"Active")

meets these requirements. If any text in column F is relevant to the above, it is not explained in your definition.

+1


source


Based on information provided in comments to another answer

if the POD Time is empty, then the job is still active, if the time on disk has a date and time, then the job is complete, so I would like to know if it will be on time or late, now the next day 17:00 the service I don't care about it so the value can be anything

I believe the formula you are after is as follows:

=IF(L2="","Active",
          IF(OR(F2="Scheduled",F2="3 Hours 30 Minutes"),IF(K2<=I2,"On time",
                                                                  "Late"),
                                                        "Other"))

      

+1


source







All Articles