I think that what you are looking for is Data Entry Validation. I did a Google search for this and found this site that has code for validating data entry. It might be similar to what you are looking for.

http://www.mrexcel.com/forum/excel-q...ions-code.html