Data validation, but is it possible?

omairhe

Well-known Member
Joined
Mar 26, 2009
Messages
2,040
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I need a data validation to go in column A which have names of the articles . These names of articles in column A will have the first character capitalized and the very next one should be non-capitalized. The third character is of no importance and hence no data validation require for it.

eg. for data validation with error:

samsung
sAmsung
SAmsung
SAMSUNG


eg. for data validation without any error:

Samsung
SaMSUNG
SamSunG


Is it possible? TY
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Select the range that you want the validation to take place in. Then in Data validation, under Allow:, select custom and paste the following formula.

Code:
=AND(AND(CODE(MID(B1,1,1))>=65,CODE(MID(B1,1,1))<=90),AND(CODE(MID(B1,2,1))>=97,CODE(MID(B1,2,1))<=122))

Change the cell reference from B1 to whatever the first cell in your range is. Make sure it is a relative reference and not an absolute one, i.e. B1, not $B$1.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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