If function with dates

Hi Experts,

I'm trying to create a formula which should give me a Date as result.

I have 2 check boxes and depends what it's clicked I would like to get the date below as results.

  1. If HALO Calendar is not clicked than DATE DATE(2022 / 8 / 26)
  2. IF HALO Calendar and Virtual Model CR1 is clicked than DATE(2022 / 10 / 13)
  3. If HALO Calendar is clicked and Virtual Model CR1 is NOT clicked than DATE(2022, 9, 14).

I tried several versions below but it's only partial working.

What is my mistake?

Thanks

=IF([Halo Calendar]@row = 0, DATE(2022 / 8 / 26), IF(AND([Halo Calendar]@row = 1, [Virtual Model CR1]@row = 1), DATE(2022 / 10 / 13), IF(AND([Halo Calendar]@row = 1, [Virtual Model CR1]@row = 0), DATE(2022, 9, 14))))

=IF([Halo Calendar]@row = 0, DATE(2022 / 8 / 26), IF([Virtual Model CR1]@row = 1, DATE(2022 / 10 / 13), DATE(2022, 9, 14)))

Tags:

Best Answer

  • Paul McGuinness
    Paul McGuinness Overachievers
    Answer ✓

    Hi @Christine Menke

    You pretty much had the formula correct but just what it was looking for was wrong, checkboxes are treated as checked = TRUE, unchecked = FALSE.

    Also you needed to change the / for , in the first two DATE formulas.

    So your formula should have been:

    =IF([Halo Calendar]@row = FALSE, DATE(2022,8,26), IF(AND([Halo Calendar]@row = TRUE, [Virtual Model CR1]@row = TRUE), DATE(2022,10,13), IF(AND([Halo Calendar]@row = TRUE, [Virtual Model CR1]@row = FALSE), DATE(2022,9,14))))

    Tested and working

    Hope this helps

    Thanks

    Paul

Answers

  • Paul McGuinness
    Paul McGuinness Overachievers
    Answer ✓

    Hi @Christine Menke

    You pretty much had the formula correct but just what it was looking for was wrong, checkboxes are treated as checked = TRUE, unchecked = FALSE.

    Also you needed to change the / for , in the first two DATE formulas.

    So your formula should have been:

    =IF([Halo Calendar]@row = FALSE, DATE(2022,8,26), IF(AND([Halo Calendar]@row = TRUE, [Virtual Model CR1]@row = TRUE), DATE(2022,10,13), IF(AND([Halo Calendar]@row = TRUE, [Virtual Model CR1]@row = FALSE), DATE(2022,9,14))))

    Tested and working

    Hope this helps

    Thanks

    Paul

  • Thanks a lot Paul it's working! 😊

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!