If you have the latest version of Excel, you can try and adapt the following formula:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(" ",TRUE,FILTER(FILTER($A$1:$F$14,$A$1:$A$14=A1),{0,0,0,1,1,1})),"RAM","RAM:")," ROM",", ROM:")," Screen size",", Screen size:")," Thickness",", Thickness:")," Certification", ", Certification:")
Drag the formula down to fill the other cells.
Explanation:
FILTER($A$1:$F$14,$A$1:$A$14=A1)
: filters the data based on the first column value (Material number).
FILTER(FILTER($A$1:$F$14,$A$1:$A$14=A1),{0,0,0,1,1,1}))
: the result of the inner/previous formula is filtered to return only the attributes' names, values and units of measurement.
TEXTJOIN(" ",TRUE,FILTER(FILTER($A$1:$F$14,$A$1:$A$14=A1),{0,0,0,1,1,1}))
: the previous formula's results are joined by a space.
- Finally, some words are replaced to added commas and semi-colons.