• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Data Validation: Alphanumeric Characters… Hyphen… Three Digits

dparteka

Member
I’m looking to create a Data Validation to confirm a proper entry into a cell. The front of the entry can have any quantity of alphanumeric characters… the middle has a hyphen… the end has three digits.

Entry Examples: R365-000 11143A-001 437-005 N20267B-010

What they all do have that are similar is the hyphen followed by the three digits.
 
@dparteka

Interesting question.

Assuming the inputs go in to cell B6, use below custom validation rule
=AND(COUNTIFS(B6,"*-???"), COUNT(RIGHT(B6,3))=1)
Just drag the cell to auto-fill the rule over all data entry area. Remember the relative references.
 
Back
Top