i created a calculated column(column name"status") with a simple formula below:

=if([Priority]="Low"), "Yellow", if([Priority]="Normal"),"Green", if([Priority]="High", ”Red")))

As you can see, what I want to achieve is that, when the "Priority" column = "Low", then the "status" column = "Yellow", and when it is ="Normal", the "status" column = "Green". The formula looks to me is correct, but when i was trying to save the page, i always got an error message with the following message:

"Sorry, something went wrong The formula contains a syntax error or is not supported."

Can you please help?


It helps when your write your Formula in a text editor (even Notepad will do) and add line-breaks and indents

 , "Yellow"
 , if([Priority]="Normal")
 , "Green"
 , if([Priority]="High", ”Red")

Where it should be

    , "Yellow"
    , if([Priority]="Normal"
         , "Green"
         , if([Priority]="High"
              , ”Red"

On copy/paste to SP all whitespace will be removed (so retain that original Notepad file!)

Note: In a decent IDE this will also catch your wrong double-quote..

  • Thank you, sir. I will follow you suggestion to write the formulas in the notepad and then copy/paste to SP. however, I encountered another error with my if statement ... checked over and again, and copied to Excel. it worked well in Excel but I always got an error in SharePoint. Can you please give me a clue? =if([Today]-[Last Reviewed Month/Year]<=180,"Green",if(and([Today]- [Last Reviewed Month/Year]>180,[Today]-[Last Reviewed Month/Year] <365),"Yellow", if([Today]-[Last Reviewed Month/Year])>"365","Red"))) – T Zhang Jun 21 '17 at 7:45
  • [Today] will never work; see: sharepoint.stackexchange.com/questions/151144/…. Please mark question as answered – Danny '365CSI' Engelman Jun 22 '17 at 18:41

There were two problems with your formula.

The first one that you missed to change the character left to "Red" to a quotation mark. The difference is tiny, but it is there. ”Red"

Second problem were that you were closing each condition, rendering the last closing brackets useless.

=if([Priority]="Low", "Yellow", if([Priority]="Normal","Green", if([Priority]="High", "Red")))
  • thanks for your help! you really have a pair of sharp eyes!!! saved my day – T Zhang Jun 20 '17 at 7:44

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.