Forum Discussion

valderes-squadra's avatar
valderes-squadra
Copper Contributor
May 13, 2022
Solved

IF formula error message "The formula contains a syntax error."

Hi all.

 

I'm trying a very simple IF formula in a calculated column at my data list.

 

=IF([Monitorar]=0;"0";"1")

 

I tried replacing  the ; by , and not solved.

I also tried replacing IF by SE (note that my Microsoft account is in portuguese), and not solved.

I tried in another browsers, an nothing different happens.

 

 

  • The column Monitorar is a date/time field, but the calculated column is a number field and should accept either 0 or 1.  I wasn't sure that a date could equal 0, but I tested this and it works fine:

     

    =IF([Due Date]=0,0,1)

     

    So  today I learned a empty date field equals 0.  Good stuff!

4 Replies

  • valderes-squadraFrom the screenshot you attached, it looks like [Monitorar] column is of type "Date" and not "Number". Is this causing the problem here?


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • The column Monitorar is a date/time field, but the calculated column is a number field and should accept either 0 or 1.  I wasn't sure that a date could equal 0, but I tested this and it works fine:

       

      =IF([Due Date]=0,0,1)

       

      So  today I learned a empty date field equals 0.  Good stuff!

  • =IF([Monitorar]=0, 0,1)

    Try using commas and remove the quotes. I think a quotes are for text, and you can’t pass text into a number column. Let me know if that works.

Resources