duplicate post with sample file
http://www.excelforum.com/excel-form...e-formula.html