Forum Discussion
Ann_DAS
Jun 08, 2023Copper Contributor
SharePoint Column Validation - minimum and maximum values
Good afternoon,
I am trying to create a list validation formula in SharePoint and need some help on the second part. The list in question has a column called "Serial Number" and the list owner would like to make sure that each entry for that field contains 8 characters and possibly one extra character (example: Serial Number can be 12345678 or 12345678B).
Is there a way to set a validation formula for minimum and maximum values such as "must be greater than 7 characters but less than 10"? I've managed to get "=LEN([Serial Number])>=7" to work but can't figure out the other half. Any ideas?
Ann_DAS Try using formula like:
=AND(LEN([Serial Number])>7,LEN([Serial Number])<10)
OR
=OR(LEN([Serial Number])=8,LEN([Serial Number])=9)
Length should be exactly 8 or 9.
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.
Ann_DAS Try using formula like:
=AND(LEN([Serial Number])>7,LEN([Serial Number])<10)
OR
=OR(LEN([Serial Number])=8,LEN([Serial Number])=9)
Length should be exactly 8 or 9.
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.
- Ann_DASCopper ContributorExcellent, It works like a charm. Thank you