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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
  • 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,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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