在EXCEL的A1里有数据:1,3,5,6, 在A2里有数据:A,B,D,A, 假设1与A 匹配,3与B匹配,5与D匹配,6与A 匹配,现要将

2024-12-05 07:17:47
推荐回答(1个)
回答1:

Function str(x, y, z)
xa = Split(x, ",")
ya = Split(y, ",")
If UBound(xa) <> UBound(ya) Then str = ",不匹配": Exit Function
For i = 0 To UBound(xa) - 1
If ya(i) = z Then str = str & xa(i) & ","
Next i
End Function