1

I am trying to create a validation formula which will verify that the user entered A or B as the first character in the column.

Can't seem to get the formula right. Can anyone help?

[EDIT] One thing I didn't realise is that column names with spaces should be wrapped in square brackets in the formulas below e.g. [Staff Name]

2 Answers 2

1

Try

=OR((CODE(MID(Title,1,1))=65),(CODE(MID(Title,1,1))=66))

This looks at the first letter entered and compares it to ASCII code 65 or 66 (A or B) and returns true if it matches one of these and thus passes validation

Andy

0
3

Add below validation formula in Validation Settings,

=OR(LEFT(Title,1)="a",LEFT(Title,1)="b")

Replace 'Title' with your column name. Please note that the formula is not case-sensitive. So it would return true for column values starting with a,A,b,B.

Refer below article for more examples,

SharePoint Column Validation Examples

1
  • I think I am too new to do that :)
    – Marion
    Commented Feb 19, 2016 at 14:35

Your Answer

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

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