I am working on SharePoint list validation. In column A, it should only allowed whole number/integer to be entered and any decimal should return an error.

I tried to set the number of decimal place to zero but it turn out the column will round it off when decimals value entered. This is not the desired validation, it should return error. enter image description here

It is much appreciated if anyone can help me out with this.

Thank you.

有帮助吗?

解决方案

Try using below formula in column validation:

=IF([Number Column] = ROUND([Number Column], 0), true, false)

enter image description here

Note:

  1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
  2. Replace [Number Column] in formula by display name of your column.

其他提示

You could add this to your column validation(change the number to your column name).

=number=ROUND(number,0)

Test result:

enter image description here

许可以下: CC-BY-SA归因
scroll top