-1

I am trying to make a column for my sharepoint list that is color coded based on how old items in the list are(i.e. if items are less than 1 day old there will be a green circle, less than 2 days but greater than 1, a yellow circle, and any item greater than 3 days there will be a red circle.) The strategy I am trying to use is to make a calculated column based off of the "Created" column. The data type I am returning from the calculated column is Number.

Here is my formula in the calculated column.

="<SPAN><SPAN style='font-size:30px;font-weight:bold;text-alignment:center;color:"&IF([Created]="","Pick Color",IF([Created]<="1","Green")&";'>•</SPAN> </SPAN>)

SharePoint is not accepting the formula because of syntax errors. What am I doing wrong?

0

Try

="<div style=""color:"&IF(NOW()-Created<=1,"Green",IF(NOW()-Created<=2,"Yellow","Red"))&";font-weight:bold;"">•</div>"

Test result in my local SharePoint 2013, the field return as Number. enter image description here

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.