Hello dear

I am attaching an excel file which would rather explain what I want to accomplish in Excel. As I am not so good with English, the attachment will explain my requirement in more detail.

Something about the attachment:

I am attaching 1 file. The file has 4 sheets. First 3 sheets namely (B1, B2 & B3) is the data what I have. The last worksheet is what I want to accomplish. I could not think over any sort of vba code or something like it to get me started. I am doing it manually right now and spending hours of time to create it like an idiot. Only God knows how many mistakes my boss will find when checks it

Thank you very much for any help.