Discussions

 View Only
  • 1.  Countdown with Conditional Formatting

    Posted 3 days ago
    Edited by V W 2 days ago

    Hello,

     

    I'm trying to show a countdown of business days to an employee's last day and would like to add conditional formatting as follows:

    If the countdown is less than 0 days, just show 0

    If the countdown is 3-0 days, bold in red font and highlight field yellow

    If the countdown is greater or equal to 4 days, no need to do any conditional formatting

     

    Can you please assist me with the formula and what field type it should be?

     

    I was trying to do a formula along the lines of:

     

    If(ToDays([Last day]-today())<=3,"

    "<font color=red><b><div style=\"background-color:yellow;\"</div>"&([Last day]-today()),

    ([Last day]-today())")

     

    But I know this won't take into account the 3 different formatting and I was getting error messages related to the field type.

    Thank you!



  • 2.  RE: Countdown with Conditional Formatting

    Posted 3 days ago
    Use formula rich text.  You can adjust font size and bolding with this one.

    If(ToDays([Last Day]-Today())<=0,"0",

    If(ToDays([Last Day]-Today())<=3,
    "<span style=\"color:red; font-size:110%; background-color: yellow; font-weight:bold\">" & ToText(ToDays([Last Day]-Today())) & "</span>",

    ToText(ToDays([Last Day]-Today()) )))

    ------------------------------
    Cuong Nguyen
    ------------------------------



  • 3.  RE: Countdown with Conditional Formatting

    Posted 2 days ago
    Hi.  Thanks, Cuong.  How about having it count business days?  How would I integrate that portion?

    ------------------------------
    V W
    ------------------------------



  • 4.  RE: Countdown with Conditional Formatting

    Posted 2 days ago
    I think I got it.  I used:

    If((WeekdaySub([Last Day],Today()))<=0,"0",

    If((WeekdaySub([Last Day],Today()))<=3,
    "<span style=\"color:red; font-size:110%; background-color: yellow; font-weight:bold\">" & ToText(WeekdaySub([Last Day],Today())) & "</span>",

    ToText(WeekdaySub([Last Day],Today()) )))

    ------------------------------
    V W
    ------------------------------



  • 5.  RE: Countdown with Conditional Formatting

    Posted 2 days ago
    If you figure out how to use WeekdaySub and get rid of holidays, I'd love to know. That's a current issue I'm trying to fix.

    ------------------------------
    Julie Bowers
    ------------------------------