Multiple Data Validation in one Cell

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Multiple Data Validation in one Cell

  1. #1
    Board Regular
    Join Date
    Apr 2006
    Posts
    638
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    15,530
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    2 Thread(s)

    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

    How to post your vba code
    [CODE]your VBA code here[/CODE]
    The # button in the forum's editor will apply CODE tags around your selected text.

  3. #3
    Board Regular
    Join Date
    Apr 2006
    Posts
    638
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple Data Validation in one Cell

    Hello Alpha,

    its working, thanks a lot for your help.

  4. #4
    New Member
    Join Date
    Oct 2008
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple Data Validation in one Cell

      
    Sorry to necro the thread but this seems relevant to my question instead of posting a new thread. I am trying to accomplish the same thing except allow any whole number up to 20 characters long. Thanks a bunch

User Tag List

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