In this post we will discuss how we can show colors based on status column value in SharePoint 2013 using calculated column. Here I have a test list which has a choice column known as “Status” column and it has values like:
So based on this value we want to show a different color in the list view so that by color it will be easy to differentiate from one and other.
For this we took a calculated column and in that calculated column we put the below logic.
=”<div style=’text-align:center; width:100%; background-color:”&IF([Status]=”Started”,”#c0c0c0;’>    </div>”,IF([Status]=”InProgress”,”#FFFF00;’>    </div>”,IF([Status]=”Incomplete”,”#FF9900 ;’>   </div> “,IF([Status]=”Critical”,”#FF0000;’>    </div>”,IF([Status]=”Done”,”#00B050;’>    </div>”)))))
And also make sure that you need to choose “Number” in the “The data type returned from this formula is:” section for the calculated column. It will look like below:
After this based on the status, the color will come like below:
Hope this will be helpful.
You May Also like the Following SharePoint Tutorials: