1

I am using SharePoint 2003.

Only 7 If statements on SharePoint:

  • 1,2,3 < green
  • 4,5,6 yellow
  • 8,9,10 amber
  • 15 > red
=IF(RAG<=3,"Green",IF(RAG=4,"Yellow",IF(RAG=5,"Yellow",IF(RAG=6,"Yellow",IF(RAG=8,"Amber",IF(RAG=12,"Amber",IF(RAG>=15,"Red")))))))
1
  • What's the exact problem here? Is it throwing an error or is it not working as expected? Jul 6 at 16:27
1

If [RAG] column is of type Number, try using this:

=IF([RAG] <= 3, "Green", IF(OR([RAG] = 4, [RAG] = 5, [RAG] = 6), "Yellow", IF(OR([RAG] = 8, [RAG] = 9, [RAG] = 10), "Amber", IF([RAG] >= 15, "Red", ""))))

Note:

  1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).

Official Documentations:

  1. Calculated Field Formulas.
  2. IF function.
2
  • Adjust [RAG] >= 15 condition as per your requirements. either [RAG] >= 15 OR [RAG] > 15. Jul 6 at 16:47
  • 1
    Thank you so much I tried all day
    – Mark
    Jul 6 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.