Forum Discussion

Re: Formulas - IS Not Null & If Then

try this as a formula text field

IF(
IsNull([Date Manager Entered]),"", //  if empty, then result is empty quotes. 
// else we know there us a date
ToDays([Date Manager Entered]-[Last Day]) < 5, "No", "Yes")


------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------

5 Replies

  • VW's avatar
    VW
    Qrew Trainee

    Thank you!  This seems to be working.

     

    What would be the formula to highlight the "no" answers to red?  I already have 3 formulas for this report so I'm wondering if the conditional formatting can be built into the same formula as the one you've already helped me with.

     

    Thank you!

     

     

    Regards,

     

    Valerie

     



  • VW's avatar
    VW
    Qrew Trainee

    Sorry, if possible, I'd also like to update the formula to calculate the number of weekdays between the two dates.

     

    I tried:

    WeekdaySub([Last Day],[Date Manager Entered])

     

    ...but I get the error message that it's "expecting date but found number."  However, both those fields are date as well as the formula.

     

    So ultimately I'm looking to update below formula to calculate the number of weekdays between "Date Manager Entered" and "Last Day" as well as make the ones that come out with the answer "No" red font.


    IF(
    IsNull([Date Manager Entered]),"", //  if empty, then result is empty quotes. 
    // else we know there us a date
    ToDays([Date Manager Entered]-[Last Day]) < 5, "No", "Yes")

     

    Thank you so much!

     

    Regards,

     

    Valerie

     



    • Ok, try changing the field type to Formula Rich Text and try this.

      IF(
      IsNull([Date Manager Entered]),"", //  if empty, then result is empty quotes. 
      // else we know there us a date
      WeekDaySub([Last Day], [Date Manager Entered]) < 5, "<font color=red><b>No", "Yes")

      ------------------------------
      Mark Shnier (Your Quickbase Coach)
      mark.shnier@gmail.com
      ------------------------------
      • VW's avatar
        VW
        Qrew Trainee

        Hello Mark.  Thanks for this.

         

        For this formula, it's picking up the "<font color=red><b>No" and placing that in the field instead of making it red.

         

         

        Regards,

         

        Valerie