2个回答
展开全部
=双条件去重($A:$C,F$1,$E2)右拉下拉
'自定义公式-按ALT+F11-插入模块-粘贴代码
Function 双条件去重(a As Range, c As String, d As String)
For i = 1 To a.Rows.Count
If a.Cells(i, 1) = "" Then Exit For
If a.Cells(i, 2) = c And InStr(t, a.Cells(i, 1)) = 0 And a.Cells(i, 3) = d Then
t = t & "|" & a.Cells(i, 1)
n = n + 1
End If
Next
双条件去重 = n
If 双条件去重 = 0 Then 双条件去重 = ""
End Function
追答
=双条件去重($A:$C,F$1,$E2)右拉下拉
'自定义公式-按ALT+F11-插入模块-粘贴代码Function 双条件去重(a As Range, c As String, d As String)For i = 1 To a.Rows.Count If a.Cells(i, 1) = "" Then Exit For If a.Cells(i, 2) = c And InStr(t, a.Cells(i, 1)) = 0 And a.Cells(i, 3) = d Then t = t & "|" & a.Cells(i, 1) n = n + 1 End IfNext双条件去重 = nIf 双条件去重 = 0 Then 双条件去重 = ""End Function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询