Conditional formula

Hello,

I'm encountering an issue with the following formula as it is incomplete, and I can't complete it to get the correct result: =IF(O19="";0;IF(O19<=6;2.65;IF(BT45="x";O19*CA46;CA49)))

I would like the formula to incorporate the following elements: if O19 is empty or equal to 0 then 0, if O19 is empty or equal to 6 then 2.65, if O19 is empty but BT45="x" then O19*CA46, if O19 is empty but BT48="x" then CA48

Thank you in advance to those who will respond

3 answers

  • Votes
  • Date
  • Descending date
  1. Hello,

    An excerpt from a file or another explanation for us to understand?

    O19 cannot be empty, equal to 0, or empty or equal to 6.

    1. Hello

      How do I add the file?

    2. @Lili03630

      For example here, anonymizing if necessary:

      And by specifying what you want to do: see my previous remark, the condition O19<=6 does not correspond to your statement, we are not sure of the default value (no condition met).

    3. @brucine

      https://cijoint.org/r/KMgrar4e#PfUejKofO74mHfov0pe3s6QkIHVX8toSChpen3Zqsu8=

      I have provided you with data and the formula concerns the cells in AF

    4. @Lili03630

      Sorry, I'm late to the meeting; my PC crashed during the last Windows update.

      If I take AF19 literally and I understood correctly:

      =IF(O19=0,0,IF(O19="",IF($BT$45="x",O19*$CA$46,IF($BT$48="x",$CA$49,0)),IF(O19<=6.22,2.65,MAX(3.83,3.83*O19/9))))

      But we will run into issues because O19 is never empty; there is a formula, if there is no time, O19 always equals 0, and we would rather have, always if I understood correctly and need to test, something like this:

      =IF(O19=0,IF($BT$45="x",O19*$CA$46,IF($BT$48="x",$CA$49,0)),IF(O19<=6.22,2.65,MAX(3.83,3.83*O19/9)))

    5. Contributor

      Hello

      Brucine is right: reformulate your question

      "If SIO19 is empty or equal to 0, then 0; if O19 is empty or equal to 6, then 2.65; if O19 is empty but BT45 = "x", then O19*C46; if O19 is empty but BT48 = "x", then CA48"

      which is incorrect...

  2. Hello,

    I don't know if I really understood everything.

    O19 containing a formula cannot be considered empty; therefore, exit the condition if O19 is empty.

    I propose this formula after having made all the checks according to my understanding.

    =IF($BT$48="x",$CA$49,IF(AND($BT$45="x",O19<=6),2.65,O19*$CA$46))

    Best regards

    1. Unless there is a more favorable agreement, the texts state that as of June 1, 2026, the compensation will be worth not 3.83 but 3.92.
      They do not distinguish the time of day but simply say that 3.92 is the minimum for 9 hours per day.
      Below and above, we must prorate according to the number of hours unless this prorata falls below 2.65, of which approximately 6 hours is just an approximation.

      In the case we are interested in, CA46 is worth one-ninth of the compensation before June 1 (3.83); we do not know where CA48 comes from as a more favorable amount (5.00) unless agreed upon.

      Assuming that these two scenarios must be considered, as observed and barring any data entry errors, we necessarily have either BT45 or (exclusive) BT48, in which case the conditional BT48 is not necessary.

      Regarding what parents forget to fill in, we must check that the hours are not empty but not null, including only the exit time.

      Formally then, and always assuming that a full day CA48 is more favorable, the partial calculation is only approximate.
      It is healthier to decree that CA46 is worth 3.92

      =IF(AND(K19=0;M19=0);0;IF($BT$45="x";MAX(2.65;$CA$46*O19/9);IF($BT$48="x";$CA$49;0)))

    2. Hello,

      I just tested the formula, but it doesn't work.

      Thank you anyway for your response.

    3. @brucine

      Hello brucine

      Actually, I made this formula based on what Lili03630 said because I hadn't seen the link to the file.

      It seems a bit more complicated to me. I'm leaving the discussion.

      Best regards

    4. @Lili03630

      What isn't working? I tested on the condition that CA46 is worth 3.92.
      Is it everything or a specific case to illustrate?

  3. Hello everyone,

    You suggested indicating the expected results. Can you do that?

    Daniel