I cannot get my IF statement to automate Harvey Balls.

Options
MDriggs
MDriggs ✭✭
edited 07/07/22 in Formulas and Functions

Hello. I have used RYG balls before to show statuses for dates. But I am wanting to use them based on the value of a single cell. I have tried various formulas but they are not working. Would anyone have advice on this? I have included a screenshot with the formula.


Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

    Try getting rid of the third IF and just have the final output of "Yellow".


    =IF(.........., "Red", IF(........, "Green", "Yellow"))

  • MDriggs
    MDriggs ✭✭
    Options

    Thank you for the support. Unfortunately this did not work. I know that I am just missing overlooking a small detail.

  • Genevieve P.
    Genevieve P. Employee Admin
    edited 07/07/22
    Options

    Hi @MDriggs

    I agree with Paul! The reason you're getting an error is because of how you have the "or" written in - it would need to use the OR Function, with different syntax. However the statement you have there would be covered if you simply had "Yellow" as the final option without instructions.

    =IF([Risk View Score]@row < 7, "Red", IF([Risk View Score]@row > 3, "Green", "Yellow"))


    However this formula will always show you either Red or Green. This is because your first statement says "If the Score is less than 7, show Red". I have a feeling you might be looking to see if the score is greater than 7, not less than, is that correct?

    Try this instead:

    =IF([Risk View Score]@row > 7, "Red", IF([Risk View Score]@row < 3, "Green", "Yellow"))

    If this doesn't work, it would be helpful to know exactly what it is you're looking to do for each colour, and what isn't working (incorrect result or formula error?)

    Thanks!

    Genevieve

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!