发布网友 发布时间:2022-04-22 04:38
共2个回答
热心网友 时间:2024-08-05 07:18
'自定义公式-按ALT+11-插入-模块(2列查询合并)
Function abc(a As Range, b As Range, c As String, Optional d As String = "/")
Set Ra = a.Find(c)
If Not Ra Is Nothing Then
For i = 1 To a.Rows.Count
If a.Cells(i, 1) = c And b.Cells(i, 1) <> "" Then t = t & d & b.Cells(i, 1)
If a.Cells(i, 1) = "" Then Exit For
Next
abc = Right(t, Len(t) - 1)
Else
abc = ""
End If
End Function
热心网友 时间:2024-08-05 07:22
=TEXTJOIN("/",,IF($J$2:$J$9=J2,$K$2:$K$9,""))