如何在excel中通过id合并两列?

时间:2014-07-03 08:33:56

标签: excel

我每个人都有两个带有id的colums。 我如何"合并"两列,以便我可以在C列的A列或B列中存在值,并重复这些值?

正如你在colume A中看到的,我有uniqe id,在colume B中我有重复的id。 我需要在colume C中使用所有B&#39s的id(包括dupicate)和在A中出现而不在B中出现的id。

A                             B                       C
---------------            ---------------         ---------------
121.45.183.129             124.86.1.183             121.45.183.129    
124.86.1.183               130.102.0.178            124.86.1.183  
130.102.0.178              130.116.32.125           130.102.0.178
130.116.32.125             130.116.32.91            130.116.32.125 
130.116.32.91              138.194.132.208          130.116.32.91
138.194.132.208            138.194.132.208          138.194.132.208
144.136.121.153            138.194.132.208          138.194.132.208
144.137.61.21              138.194.132.208          138.194.132.208
202.122.132.4              138.194.132.208          138.194.132.208
202.181.31.4               138.194.132.208          138.194.132.208
203.166.247.160            138.194.132.208          138.194.132.208
203.17.154.70              138.194.132.208          138.194.132.208
                                                    138.194.132.208
                                                    144.136.121.153
                                                    144.137.61.21
                                                    202.122.132.4
                                                    202.181.31.4
                                                    203.166.247.160
                                                    203.17.154.70

谢谢!

1 个答案:

答案 0 :(得分:0)

使用以下内容插入新ColumnA:

=COUNTIF(C:C,B1)  
A1中的

被复制下来以适应。排序Z> A ColumnsA:B,在ColumnA中的0旁边的ColumnB中选择范围并将其拖到C13。