Database Population Validation Help

banjoflanjo

New Member
Joined
Mar 20, 2008
Messages
44
Hi,

I have a cell with the named range “Form1”. This cell is used to populate a database and would normally contain a project number in the format C1234567, where it always starts with a capital C followed by 7 numbers. What I want to do is this, before I run my macro to populate the database, I want the code to check that the letter C entered in “Form1” is in fact upper case, if it is not then I want it to change it to upper case and then continue.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Also, just as an extra validation I would like it to check that the first letter is in fact the letter C, if it is not I would like to display a message like “This project prefix is ‘x’ rather than ‘C’, please double check your project number and try again.”
<o:p></o:p>
Does that sound do-able?
<o:p></o:p>
Thanks
<o:p></o:p>
Banjoflanjo
 
And of course if I can also get it to validate the fact that the text string contains 8 characters in total (1 letter, 7 number) where it shows the message "All project numbers should be 8 characters long eg. C1234567. Please check your project number entered and try again." That would be an added bonus!
 
Upvote 0

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