Skip to main content
I set up a formula field to divide two other fields and give me a value. Now I want it to look like this:

 

If the value <55, the cell will be Green

 

If the value between 55-60, the cell will be Yellow

 

If the value is >60, the cell will be Red

 

How can I set up the color coding part?

 

Thanks in advance.
2 Antworten
  1. 15. Juni 2022, 12:45

    Use CASE() function to achieve above requirement:

    Note: The CASE() function is a powerful Salesforce tool that allows users to simplify formula writing, stay within compile limits, and create cleaner, easier to read functions versus using long and clunky nested IF() statements.

     

    CASE(fieldname, 

    "Green(field value)",IMAGE("/img/samples/color_green.gif", "Green", 30, 30),

    "Amber(field value)",IMAGE("/img/samples/color_yellow.gif", "Amber", 30, 30),

    "Red(field value)",IMAGE("/img/samples/color_red.gif", "red", 30, 30),

    "") 

0/9000