Compare 2 columns in Sharepoint list

Copper Contributor

Hello

I would like to add a column in my Sharepoint list that has a certain restriction.

I have made a little example to illustrate it:

louisquinet_0-1707481637815.png

I would like that column "number 2" receives in a way a restriction that is has to be equal smaller than the number from column "number 1".
I do not know what the possibilities are, but for example to not allow to save it when someone uploads it. Or to put the field in red or something.

Does anyone know how to do that?
Thank you in advance
Louis

1 Reply

@louisquinet You can use List validation settings for this requirements.

 

Use formula like: 

 

=[Number 2] <= [Number 1]

 

You can find the detailed steps to add list validation formula in my answer at: List validation if then syntax

 

 

Note:

  1. Sometimes comma( , ) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon( ; ) instead of comma( , ).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

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.