1、添加两个辅助列,返回相同内容的信息合并:并分别在D2和E2输入
=B2&IF(COUNTIF(A3:A10,A2),","&VLOOKUP(A2,A3:B10,2,0),"")
=C2&IF(COUNTIF(A3:A10,A2),","&VLOOKUP(A2,A3:C10,3,0),"")
并向下填充公式;
2、删除重复项,G2单元格输入
=INDEX(A:A,MIN(IF(COUNTIF($G$1:G1,$A$2:$A$10)=0,ROW($2:$10),4^8)))&""
按Ctrl+Shift+Enter组合键结束,并向下填充公式;
3、通过VLOOKUP函数查找辅助列中的合并信息,分别在H2和I2单元格输入
=VLOOKUP(G2,A:E,4,0)
=VLOOKUP(G2,A:E,5,0)
并向下填充公式;
4、如有必要,将G:I列复制并粘贴为数值,然后删除A:F列内容。