+ Reply to Thread
Results 1 to 3 of 3

Data validation problems

  1. #1
    Registered User
    Join Date
    05-02-2006
    Posts
    80

    Question Data validation problems

    Hi there,

    Been struggling with this all day and wondering if any finer minds than I could help out.

    I've created a user form that sends data (entered into a text box) back to a worksheet.

    What I'd like to do is restrict the entry of data to a specific format shown below:

    "Variable length text string"3 figures_"C" or "D"_Grid reference

    Obviously that doesn't read too well, some examples below:

    Banana002_C_C11
    Mango105_C_E09
    Pear067_D_A01

    The grid reference range is A-H and 1-12.

    I need some kind of alert for this and to make matters worse there can be up to 10 entries (from different text boxes - they all get processed when an "OK" button is clicked) to loop through. In a perfect world if an entry is not in the correct format then the user then gets the option to change or ignore the entry (in which case it wouldn't get processsed further). Of course that might be a bit of overkill.

    Will carry on working on this tomorrow but am interested to see what people can work out.

    Thanks, Tris

  2. #2
    Tom Ogilvy
    Guest

    Re: Data validation problems

    Look in VBA help at the Like operator

    --
    Regards,
    Tom Ogilvy


    "Tristan" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi there,
    >
    > Been struggling with this all day and wondering if any finer minds than
    > I could help out.
    >
    > I've created a user form that sends data (entered into a text box) back
    > to a worksheet.
    >
    > What I'd like to do is restrict the entry of data to a specific format
    > shown below:
    >
    > "Variable length text string"3 figures_"C" or "D"_Grid reference
    >
    > Obviously that doesn't read too well, some examples below:
    >
    > Banana002_C_C11
    > Mango105_C_E09
    > Pear067_D_A01
    >
    > The grid reference range is A-H and 1-12.
    >
    > I need some kind of alert for this and to make matters worse there can
    > be up to 10 entries (from different text boxes - they all get processed
    > when an "OK" button is clicked) to loop through. In a perfect world if
    > an entry is not in the correct format then the user then gets the
    > option to change or ignore the entry (in which case it wouldn't get
    > processsed further). Of course that might be a bit of overkill.
    >
    > Will carry on working on this tomorrow but am interested to see what
    > people can work out.
    >
    > Thanks, Tris
    >
    >
    > --
    > Tristan
    > ------------------------------------------------------------------------
    > Tristan's Profile:

    http://www.excelforum.com/member.php...o&userid=34061
    > View this thread: http://www.excelforum.com/showthread...hreadid=538264
    >




  3. #3
    Registered User
    Join Date
    05-02-2006
    Posts
    80
    Thanks for the pointer. Think I've got it licked.

    Cheers

+ 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