Excel 取出一列中相同名字的行信息,并组合在同一个单元格内!求大神帮忙

 我来答
Agricola88
2014-11-18 · TA获得超过1万个赞
知道小有建树答主
回答量:1223
采纳率:66%
帮助的人:247万
展开全部

示意图如下:

在C2中输入公式:=INDEX(A$2:A$96,MATCH(,COUNTIF($C$1:C1,$A$2:A$96),))&""  ,同时按下ENTER键,SHIFT键,和CTRL键,公式下拉.

在D2中输入公式:=IF(C2="","",IF(SUM(IF($A$2:$A$93=C2,1))=1,INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$1))),IF(SUM(IF($A$2:$A$93=C2,1))=2,INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$1)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$2))),IF(SUM(IF($A$2:$A$93=C2,1))=3,INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$1)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$2)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$3))),IF(SUM(IF($A$2:$A$93=C2,1))=4,INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$1)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$2)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$3)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$4))),IF(SUM(IF($A$2:$A$93=C2,1))=5,INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$1)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$2)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$3)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$4)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$5))),IF(SUM(IF($A$2:$A$93=C2,1))=6,INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$1)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$2)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$3)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$4)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$5)))&","&INDEX($B$2:$B$93,SMALL(IF($A$2:$A$93=C2,ROW(A$1:A$92)),ROW(A$6)))))))))) ,同时按下ENTER键,SHIFT键,和CTRL键,公式下拉.

 

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式