This SharePoint tutorial, we will discuss how to color code SharePoint list column value based on condition using the calculated column in SharePoint.
Show list column value in a different color in SharePoint
This example explains, how to show colors based on status column value in SharePoint 2013 list using the calculated column.
Here I have a SharePoint list which has a choice column known as “Status” column and it has values like:
So based on this value we want to show different color in the list view so that by color it will be easy to differentiate from one another in the SharePoint list.
For this, we took a calculated column and in that calculated column we put the below logic like below:
="<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 column in the list, the color will come like below:
You may like following SharePoint tutorials:
- Create Navigation with managed metadata service SharePoint 2013
- The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please contact your Administrator
- Configure and Consume Managed Metadata Service Application in SharePoint 2013
- How to create and configure metadata navigation and filtering SharePoint Online?
- Create a responsive navigation menu using managed metadata navigation in SharePoint server 2013
- SharePoint 2016 BCS error The metadata object that has Name your name has a Property with name AuthenticationMode and value RevertToSelf.
- Working with Enterprise Metadata and Keywords Settings for List and Document library in SharePoint Online
Hope this SharePoint tutorial explained, how to color-code SharePoint list column value based on condition using the calculated column in SharePoint.
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 SPGuides.com