SharePoint 2013 online Show color in different color based on status column value in SharePoint 2013 using Calculated column

SharePoint 2013 online Show color in different color based on status column value in SharePoint 2013 using Calculated column

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:
Started
InProgress
Incomplete
Critical
Done

Also, read:
Build hyperlink inside an email in SharePoint designer workflow

Change SharePoint site logo using PowerShell

How to change the favicon in SharePoint 2013 site?

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;’> &nbsp&nbsp </div>”,IF([Status]=”InProgress”,”#FFFF00;’> &nbsp&nbsp </div>”,IF([Status]=”Incomplete”,”#FF9900 ;’>&nbsp&nbsp </div> “,IF([Status]=”Critical”,”#FF0000;’> &nbsp&nbsp </div>”,IF([Status]=”Done”,”#00B050;’> &nbsp&nbsp </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:

SharePoint 2013 online Show color in different color based on status column value in SharePoint 2013 using Calculated column
SharePoint 2013 online Show color in different color based on status column value in SharePoint 2013 using Calculated column

After this based on the status, the color will come like below:

SharePoint 2013 online Show color in different color based on status column value in SharePoint 2013 using Calculated column
SharePoint 2013 online Show color in different color based on status column value in SharePoint 2013 using Calculated column

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →