+ Reply to Thread
Results 1 to 4 of 4

Custom Data Validation

Hybrid View

  1. #1
    Registered User
    Join Date
    11-21-2008
    Location
    UK
    Posts
    14

    Custom Data Validation

    Hi All,
    I need to data validations for two different cells anyone able to assist

    First cell needs to be in this format in numbers only
    #####/##

    Second needs to be a Letter followed by 6 numbers eg:
    J123456

    I have tried all types of formulas without any success

  2. #2
    Forum Contributor
    Join Date
    01-07-2025
    Location
    Iran
    MS-Off Ver
    Pro.Plus.2024.v2502
    Posts
    157

    Re: Custom Data Validation

    Format: #####/##

    Select the cell where you want this validation (e.g., A1). Go to Data >> Data Validation. Set Allow to Custom. In the Formula box, enter this:

    Formula: copy to clipboard
    =AND(LEN(A1)=8,ISNUMBER(VALUE(LEFT(A1,5))),MID(A1,6,1)="/",ISNUMBER(VALUE(RIGHT(A1,2))))


    For letter followed by 6 numbers

    Formula: copy to clipboard
    =AND(LEN(A1)=7,ISTEXT(LEFT(A1,1)),ISNUMBER(VALUE(RIGHT(A1,6))))
    Life unfolds as we shape it.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,789

    Re: Custom Data Validation

    What version of Excel are you using?
    If you have 365 with Regex functions how about
    Formula: copy to clipboard
    =REGEXTEST(D2,"\d{5}/\d{2}")
    and
    Formula: copy to clipboard
    =REGEXTEST(E2,"[A-Z]\d{6}")

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Custom Data Validation

    Quote Originally Posted by stu_C View Post
    Join Date 11-21-2008
    Location UK
    Posts 14
    Please add your Excel version to your profile. It won't help you to give you a solution that won't work with your version. Provide the commercial release name (e.g., Excel 2016, Excel 2024, Microsoft 365).
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Combining a custom data validation and a list validation
    By jmcole in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2023, 05:29 PM
  2. Custom Data Validation
    By Gazsim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2019, 10:28 AM
  3. Replies: 0
    Last Post: 11-20-2015, 12:34 PM
  4. Custom Data Validation
    By plans in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-30-2015, 04:42 PM
  5. [SOLVED] Custom Data Validation
    By turist in forum Excel General
    Replies: 3
    Last Post: 03-18-2014, 02:16 PM
  6. Custom Data Validation
    By Brenda42 in forum Excel General
    Replies: 4
    Last Post: 08-15-2011, 02:06 AM
  7. Custom data validation
    By Guy Normandeau in forum Excel General
    Replies: 3
    Last Post: 04-18-2006, 11:15 AM

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