# RGB Balls IF Function on 4 Colours Rules

edited 12/09/19

Hello everyone, sorry if my grammar is bad. I am Chilean and I recently use Smartsheet, I have learned a lot in a short time. Now I need to solve this formula.

Grey =  IF Stock Column is “ “ (empty)

Red = IF Stock Column is “0”

Yellow = IF Stock Column <= Critico Column

Green = IF Stock > Critico Column

Could you give me a hand

(see image)

• ✭✭✭✭✭✭

Try:

=IF(ISBLANK(Stock@row), "Grey", IF(Stock@row = 0, "Red", IF(Stock@row > Critico@row, "Green", "Yellow")

• First of all, thank you very much for your help. However, I tried and it doesn't work. Or I am doing something wrong  (see image).

• ✭✭✭✭✭✭

Hmm.. I do see a spelling error in my formula. I would also leave the @row versus using Stock8 for example. I tested this new one and it works.

Do you know if your formulas need to be separated by a ";" or a ","?

=IF(ISBLANK(Stock@row), "Gray", IF(Stock@row = 0, "Red", IF(Stock@row > Critico@row, "Green", "Yellow")))

• Many thanks ! you're absolutely right it's better use row@

• ✭✭✭✭✭✭

You might also need to translate the colors into your language. When you click on the dropdown for the RYG symbol column, use whatever spelling is there. Those are the keywords you will need to use trigger those symbols. I helped someone yesterday who had a similar problem.

https://community.smartsheet.com/discussion/rgb-balls-format

• Yes, thanks, I had already learned it from you and had previously applied it. Thanks again

• ✭✭✭✭✭✭

Awesome. Glad you got it figured out.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!