To receive the most appropriate answer, please attach a sample workbook with the structure you have and what you expect.

It's unlikely somebody is going to put one together to test out a solution.