Results 1 to 5 of 5

Alphanumeric Data Validation, Input Mask?

Threaded View

  1. #1
    Registered User
    Join Date
    11-28-2013
    Location
    Excelland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question Alphanumeric Data Validation, Input Mask?

    Hello,

    I'm trying to do the following as a formula for data validation.

    The string that should be allowed in cell A1 is:

    ABCnnnnnnLLLXX

    ABC is the string "ABC"
    n is a number
    L is a capital letter
    X is either a number or a capital letter


    As data validation formula, I came up with the following formula:

    =AND(LEFT(A1,3)="ABC",ISNUMBER(MID(A1,4,6)+0),AND(CODE(MID(A1,10,3))>=65,CODE(MID(A1,10,3))<=90),
    OR(AND(CODE(RIGHT(A1,2))>=48,CODE(RIGHT(A1,2))<=57),AND(CODE(RIGHT(A1,2))>=65,CODE(RIGHT(A1,2))<=90)),LEN($B2)=14)

    My problem now is that the CODE function only looks at the first character of the selected area defined by the MID functions.

    So far I can still enter strings like

    ABCnnnnnnL%%X%

    where % is any character

    e.g. ABC123456A$*0£


    Is there a function similar to the CODE function or is there an easier way of solving my problem?


    Any help will be appreciated.

    Kind regards
    bondingfortoday
    Last edited by bondingfortoday; 01-20-2014 at 10:32 PM. Reason: Code brackets

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. alphanumeric data validation
    By pankajy18 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2013, 01:07 PM
  2. Problem with Data Validation VBA code and protected sheets. Please help.
    By drew.j.harrison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2013, 01:33 AM
  3. [SOLVED] VBA code silently crashing. Problem with Data Validation drop down lists.
    By Don Wiss in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-28-2012, 10:01 PM
  4. alphanumeric Data Validation across tabs in a workbook
    By CharterJP in forum Excel General
    Replies: 17
    Last Post: 11-19-2010, 03:19 PM
  5. custom data validation for alphanumeric entry
    By wotadude in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-19-2009, 04:23 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1