data validation

chef

Well-known Member
Joined
Jul 10, 2002
Messages
610
Office Version
  1. 365
  2. 2016
I am trying to fathom out best way to approach data input issue

I can auto populate with an employee number a whole range of metrics with lookup but it has to be in a certain format and I want an data validaton pop up saying incorrect format if not input correctly

All employee numbers start with a T..does not matter lower/uppercase
It is then followed by 7 numbers although the very last digit can be alpha on occasions

so I am looking to ensure T1234567 or T123456X for example is the only format accepted so a T..6 numbers ..followed by a number or alpha for last digit

hope makes sense and maybe I cant see wood for trees trying to fathom out.
regards

sorry..this is cells column A and down to row 14500
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try this custom Data Validation formula:
=AND(UPPER(LEFT(A1))="T",LEN(A1)=8,NOT(ISERROR(MID(A1,2,6)+0)))
 
Upvote 0
Neil
Thank you so much for quick reply and solution..worked perfect and I would never have fathomed that out

many thanks for the help
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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