Read your question again. Does it provides enough information to help you ? Try to explain your question in layman language when you post your question on forums. We don't know anything about your data structure. Cite some examples with sample workbook or data and your expected output so that people here can help you. Only way to get a quick answer is to help us to help you.