0

No matter which syntax i use, sharepoint throws me a syntax error on IF function.

here is what i have tried so far

= IF ( [colA] = "dddd"; "yes" ; "no" )
= IF ( [nr1] < [nr2]; "yes"; "no")
= IF ( [colA] = "ddd", "yes", "no")  -my localization should use " ; "
= IF ( [colA] ='ddd'; 'yes'; 'no')

I can't figure out what's wrong, can this be something that is restricted from Sharepoint Admin in the enviroment?

1
  • Strange....Assuming you have a single line of text column with display name Column1. Try using this: =IF([Column1]="ABC";"OK";"Not OK"). Also, return the data type of your column as "Single line of text". Jul 29, 2020 at 15:38

2 Answers 2

1

I think you should use , instead of ;.

Also dont give space after If. Try these:

= IF([colA]="dddd","yes","no")
= IF([nr1]<[nr2],"yes","no")

let me know if it works. I used comma and it works fine.

2
  • please see line 3, where i stated my localization. I have tried commas :) Jul 29, 2020 at 13:54
  • =IF([tal1]=[tal2],1,2), =IF([tal1]=[tal2],"1","2") - throws syntax error same with ; Jul 29, 2020 at 14:02
0

Official document: https://support.microsoft.com/en-us/office/if-function-7025be14-5665-43d0-af20-8293d1fe9d3a

=IF(Title="1","yes","no") should be ok.

Test Result:

enter image description here

1
  • Tried it both with , and ; my localization is ; and i have other calculated columns that works with ; it just seems that IF doesnt want to work. I will have a meeting with our software partners in September, it must be something in the enviroment thats not right. Jul 31, 2020 at 8:30

Your Answer

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

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