+ Reply to Thread
Results 1 to 3 of 3

need help: Cell check

  1. #1
    Registered User
    Join Date
    03-08-2005
    Posts
    2

    need help: Cell check

    I just cant find how i can test of my cell got follwing format:

    AAA-000

    A= A character
    0= A number

    if the format is like jonas-154 he must give a false back in a if statement because it must be jon-154
    or when it is 145-478 it must give error beceaus it must be chacters and then -
    and also i want something that test if there is more than one - in a cell

    pleas react fast need it fast

    thx jonas "Spykie" verhaert

  2. #2
    Forum Contributor
    Join Date
    12-02-2004
    Location
    London
    Posts
    255
    If you put the following in as a data validation (custom):-

    =IF(AND(CODE(LEFT(A1,1))<123,CODE(LEFT(A1,1))>96,CODE(MID(A1,2,1))<123,CODE(MID(A1,2,1))>96,CODE(MID(A1,3,1))<123,CODE(MID(A1,3,1))>96,CODE(MID(A1,4,1))=45,LEN(A1)=7,ISERROR(VALUE(RIGHT(A1,3)))=FALSE),TRUE,FALSE)

    This will check that the first three characters are a-z (lowercase only), the fourth character is a hyphen and the fifth to seventh characters are numbers.

    It won't allow any more than 7 characters and will error if the letters are put in in uppercase.

  3. #3
    Registered User
    Join Date
    03-08-2005
    Posts
    2
    Thx i needed it hard

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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