This is an old one but I never got it solved so maybe someone knows the solution, it would be useful again... Every id on sheet1 has one or more datasets and these datasets consist information that belong to a certain type (on sheet2). These types are: Type1= Ddate, Reason. Type2=usedD1, usedD2, usedD3, endDate, Type3=Other.
This information on sheet1 should be extracted to sheet2 according to these types, so data originally in one row could be splitted on multiple different rows on sheet2.
Hopefully this attachement is clear enough. There is one sheet, on top is shortened version of sheet1 (original) and below is sheet2 (what it should look like at the end):