Results 1 to 3 of 3

Multiple Data Validation in one Cell

This is a discussion on Multiple Data Validation in one Cell within the Excel Questions forums, part of the Question Forums category; Hi, Could you please help with VBA or any other method to have multiple validation for one cel Cells A1:A100 ...

  1. #1
    Board Regular
    Join Date
    Apr 2006
    Posts
    527

    Default Multiple Data Validation in one Cell

    Hi,

    Could you please help with VBA or any other method to have multiple validation for one cel Cells A1:A100
    User enters the Invoice numbers in these cells.

    Data Validation:-
    1. User should be able to enter only the words Starts with V,W & COM
    if it starts with V or W then allow only 6 charectors
    if its Start with COM then allow 8 charectors.

    Thanks for your help in advance
    Arvind

  2. #2
    MrExcel MVP AlphaFrog's Avatar
    Join Date
    Sep 2009
    Posts
    11,852

    Default Re: Multiple Data Validation in one Cell

    • Select cells A1:A100
    • Select from the menu Data\Validation
      • Allow: Custom
      • Formula: =OR(AND(OR(LEFT(A1,1)="V",LEFT(A1,1)="W"),LEN(A1)=6),AND(LEFT(A1,3)="COM",LEN(A1)=8))
      • Configure your message on the Error Alert tab
      • OK
    Paste your Excel data to the forum...
    MrExcel HTML Maker or Excel Jeanie

    Please surround your pasted VBA code with CODE tags e.g.;
    [CODE] your VBA code here [/CODE]
    The pound # icon in the forum editor will apply the CODE tags around your selected text.

  3. #3
    Board Regular
    Join Date
    Apr 2006
    Posts
    527

    Default Re: Multiple Data Validation in one Cell

    Hello Alpha,

    its working, thanks a lot for your help.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com