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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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