Validation on Cell

NeilB1701

New Member
Joined
Dec 20, 2013
Messages
1
Hi I have been looking through various posts for an answer to this question and need some help please.

At work we use spread sheets as timesheets. The first column is for a project code and is either entered as 'SC1111' for service calls or '12345-0111'.In both examples the numbers could be anything. But the length is always the same.

Validation seems quite basic is there a way to get Excel to prevent any other input in a range of cells, I know it is tricky as neither possible data entries are similar.

Thank you

Neil
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
If you have a list of all the codes used, you could use data validation.

Of you could use a VBA to check if the code is either

Two letters followed by 4 numbers = SC1111
OR
5 numbers - 4 numbers = 12345-0111
 
Upvote 0

Forum statistics

Threads
1,215,710
Messages
6,126,396
Members
449,312
Latest member
sweetfriend9

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