I need help writing an IF statement for a SP calculated column. I have it working right now to display the green indicator, but need to add the clauses for it to display the yellow and red indicators as well.


The first section (green status) is what is working, the rest needs modification I know. Basically I want to add :

IF Colour="Red" then display "/_layouts/images/KPIDefault-2.GIF"

IF Colour="Yellow" then display "/_layouts/images/KPIDefault-1.GIF"

PLEASE help :)


Just keep nesting the if statements,


The syntax above might not be perfect, but you should get the idea

  • What is wrong with my syntax, i am getting errors? ="<DIV><img src='"&IF(Colour="Green","/_layouts/images/KPIDefault-0.GIF"),"&IF(Colour="Yellow","/_layouts/images/KPIDefault-1.GIF"),"&IF(Colour="Red","/_layouts/images/KPIDefault-2.GIF")&"'></DIV>" – dave Jan 22 '14 at 16:37
  • Hurray, I got it, thanks to you and this other thread : sharepoint.stackexchange.com/questions/36237/…. Thank you therefore to Trisha and Ryan as well. – dave Jan 22 '14 at 16:44
  • ="<DIV><img src='"&IF(Colour="Green","/_layouts/images/KPIDefault-0.GIF",IF(Colour="Yellow","/_layouts/images/KPIDefault-1.GIF",IF(Colour="Red","/_layouts/images/KPIDefault-2.GIF")))&"'></DIV>" – dave Jan 22 '14 at 16:44
  • I am not sure but have a look here link – Dovahkiin Jan 22 '14 at 16:47

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.