问题描述
我想将两个单元格中的数据连接成一个单元格。我也只想合并那些具有相同ID的单元格。
任务ID名称
4355.2参与者
4355.2主管
4462.1在线
4462.1快速
4597.1幻灯片
4597.1一页
4597.1一个主题
例如,为此,我想要一个4355.2的单元格,其中参与者,领导者作为该单元格中的数据。 4462.1的数据类型与该单元格的数据相同,带有在线和快速。
任务ID名称
4355.2参与者,领导者
有没有办法在Excel中做到这一点?
4462.1在线,快速
假设您的数据位于 A1:B8
并排序。
在C2中,
= IF(OR(A2> A1,A1 =任务ID),B2,C1&,& B2)
,并将其复制到数据末尾将列A复制到D列,并删除重复的(告诉excel不要扩大选择范围)
在E2中,
= INDEX(C:C,MATCH(D2,A :A),1)
并将其复制到D列中已删除重复数据的末尾 I would like to concatenate data from two cells into one cell. I would also like to only combine those cells that have the same ID.
Task ID Name
4355.2 Participant
4355.2 Leader
4462.1 Online
4462.1 Quick
4597.1 Slide
4597.1 One Page
4597.1 One Topic
For example, for this, I would like a cell for 4355.2 with "Participant, Leader" as the data in that cell. The same type of data for 4462.1 with "Online and Quick" as the data for that cell.
Task ID Name
4355.2 Participant, Leader
Is there a way to do that in Excel?
4462.1 Online, Quick
Assuming your data is in A1:B8
, and sorted.
in C2, =IF(OR(A2>A1,A1="Task ID"),B2,C1&", "&B2)
, and copy this down to the end of the data
Copy column A to column D, and remove duplicates (tell excel not to expand the selection)
In E2, =INDEX(C:C,MATCH(D2,A:A),1)
and copy this down to the end of the de-duplicated data in column D
这篇关于Excel连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!