Please upload an excel file with some data to explain your problem and fill some cells with the desired results; it's hard to get what you want without an example.