Sharepoint Colour Coding for a Calculated Cell

Basma Cassidy 21 Reputation points


I am using SharePoint 2010 and 2013. I have a library with multiple columns. One particular column is titled ‘State’. In this field, the user selects one of the available states. For example they may select either Approved or Cancelled or Rejected. Depending on the selected state, I would like the field to not only have the selected in text but also a particular colour. For example, Approved will display ‘Approved’ and be coloured green.

I’m new to SharePoint and any assistance would be greatly appreciated.

Kind regards,

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,208 questions
{count} votes

Accepted answer
  1. Echo Du_MSFT 17,116 Reputation points

    Hello @Basma Cassidy ,

    You apply colour formatting to a List based on value in cell using JQuery code.

    Please follow steps:

    1.Go to SharePoint List, create a Choice column.

    2.Click on settings icon under the Upper right corner, and then click on Edit page.
    3.Add the Script Editor web part, and then click on EDIT SNIPPET.

    4.Paste in code as shown below then click Insert.

    5.Stop Editing

    Echo Du


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful