需要用VBA来弄的话,扣 代码如下 Sub test()Dim i As Long, jl As Long, ary, aryB, d As Object, st As String, t As Doublet = Timerjl = [a1048576].End(3).Rowary = Range(A2:B & jl)Set d = CreateObject(scripting.dictionary)For i = LBound(ary) To UBound(ary)d(ary(i, 1)) = NextaryB = d.keysk = 1For i = LBound(aryB) To UBound(aryB)k = k + 1Cells(k, C) = aryB(i) For j = LBound(ary) To UBound(ary) If ary(j, 1) = aryB(i) Then st = st & ary(j, 2) & ; End If NextCells(k, D) = Left(st, Len(st) - 1)st = NextMsgBox 处理结束,共用时 & Timer - t & 秒End Sub