No matter how simple I make my formula I always get an error when I try to save a new calculated column with an IF statement in it. For example:

=IF("Foobar"="Foobar", "Foo", "Bar")

On save I get "The formula contains a syntax error or is not supported"

BTW. I'm using Sharepoint in Office 365

  • It would seem that in Office 365 you have to use semi-colons instead of commas it totally right, after trying a lot of working examples that were not working I almost get crazy, then I saw this post to use semi-colons and now it is working thanx a lot
    – Cavit
    Commented Nov 12, 2018 at 17:54

6 Answers 6


Your formula is perfectly valid code

Language settings? Most non-english environments require a ; instead of ,

On English environments you can install a Bookmarklet to enhance the Calc editor

This blog might be of help too

  • Yip thanks, just posted the answer, but yours looks more complete. Marking as correct!
    – Jacques
    Commented May 26, 2016 at 16:32
  • Out of interest, our environment is set to South African English, so what would make this different? Or is it perhaps because we use a comma to separate decimals?
    – Jacques
    Commented May 26, 2016 at 16:34
  • 1
    If a comma is used to separate decimals, then it can not be used to separate parameters (as you would not be able to use decimals) , ergo the ; (semi-colon) is required. Same applies to formulas in Excel Commented May 26, 2016 at 19:01

Same error displayed to me from SharePoint 2013 while creating a calculated column. See my formula below ('Date' is a DateTime column, I am trying to get 'Month Name-Year' format).


Once I changed my site's Locale from German to English, The same formula worked perfectly. Later I reverted the locale back to German so that I can show Month names in German.

  • I can confirm changing the (sub)site's locale to English(UK) makes column validation work as expected (for English style formulae).
    – HKOB
    Commented Jan 4, 2021 at 16:46


=IF(EXACT("Foobar", "Foobar"), "Foo", "Bar")

You need to try this.

=IF([ColumnName]="Foobar", "Foo", "Bar")

It would seem that in Office 365 you have to use semi-colons instead of commas. Here's the working formula:

  • It depends on your regional settings. Commented May 26, 2016 at 16:31

the formula should be like this:

=IF([Column]="<string>", "<string>", "<string>")

I tested your formula in my O365 tenant (copy pasted from your post) and it works with no issue. Can you please check if you mispelled something? the other thought is that the data type you are using is not a single line of text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.