『』EXCEL如何比对相似度

EXCEL文档中查找彼此相似的值,并取其相对应的其它数据
D2输入公式:
=if(isnumber(find(c2,b2)),a2,"")
将公式向下复制就可以实现符合条件就显示A列,不符合就什么都不显示 。



EXCEL如何比对相似度
【『』EXCEL如何比对相似度】Private Sub CommandButton1_Click()
[A:B].Font.ColorIndex = xlAutomatic
Dim st$, sr$, i%, j%, r%, k%, m%
r = ActiveSheet.[A65536].End(3).Row
For i = 1 To r
m = Len(Cells(i, 1))
For k = 1 To m
If IsError(Application.Find(Mid(Cells(i, 1), k, 1), Cells(i, 2))) = True Then
Cells(i, 1).Characters(Start:=k, Length:=1).Font.Color = -16776961
End If
Next
Next
For i = 1 To r
m = Len(Cells(i, 2))
For k = 1 To m
If IsError(Application.Find(Mid(Cells(i, 2), k, 1), Cells(i, 1))) = True Then
Cells(i, 2).Characters(Start:=k, Length:=1).Font.Color = -16776961
End If
Next
Next
End Sub