Dependent data validation is explained in detail on Contextures: http://www.contextures.com/xlDataVal02.html

There are different approaches, depending on your data structure. The best advice can only be given if you share your data structure by uploading a file.