Looking for some advice on a business order hypothetical. As per the attached image, a person orders some mobile phones and some N number of accessories. I'm looking to update the phones description based on quantity and what accessories have been orders for each order ID.
Eacher Order ID and Phone S/N are unique, and only phones have a S/N. The number of accessories won't exceed the number of phones.
Order ID Phone S/N Description Quantity Updated Description
O-001 P-001 Samsung S22 1 Samsung S22 + Plastic
O-001 P-002 Samsung S22 1 Samsung S22 + Glass
O-001 Plastic Protector 1
O-001 Glass Protector 1
O-002 P-003 Samsung S22 1 Samsung S22 + Plastic
O-002 P-004 Samsung S22 1 Samsung S22 + Plastic
O-002 Plastic Protector 2
O-003 P-005 Samsung S22 1 Samsung S22
O-003 P-006 Samsung S22 1 Samsung S22 + Glass
O-003 Glass Protector 1
Currently, I have working formulas for 0 or 1 type of accessory, but no clue how to proceed if there's 2 or more. Any help is greatly appreciated.
This could be accomplished using Power Query, available in Windows Excel 2010+ and Excel 365 (Windows or Mac)
To use Power Query
Data => Get&Transform => from Table/Rangeorfrom within sheetHome => Advanced EditorApplied Stepsto understand the algorithm