If Palmetto's suggestion does not works for you, if you like upload a small sample workbook to work on it. I have an idea using sumif and Indirect functions..