this will probably require some VBA. Suggest you post a sample worksheet so that members can provide you with specific code to meet your needs.