Multiple Data Validation in one Cell

aravindhan_31

Well-known Member
Joined
Apr 11, 2006
Messages
672
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
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
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
  • 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
 
Upvote 0
Sorry to necro the thread :devilish: 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 (y)
 
Upvote 0

Forum statistics

Threads
1,213,556
Messages
6,114,284
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top