Greetings to all;
First of all many thanks for the time to read my question, I've been reviewed in the forum but I have not had capable to find something similar, I have the following table:

and I need to obtain this result

I've used Vlookup in VBA but this function only gives me the 1st result founded.
The reason I need to do this with macros is because this re-arrangement will be part of a loop process with information from different sources, but requiring the same treatment.
I'll be very grateful for any idea / comment or suggestion.
Best regards
Table.xlsx
In the attached, click the button Transform Data to get the desired output in a separate sheet.
if you have an issue in downloading and opening the attached file due to a temporary bug in the forum, first download and save it on your system and then open it.
Open in new window
Table.xlsm