4个回答
展开全部
Sub TEXT()
[d9] = "辅助1"
[E9] = "辅助2"
Dim RNG As Range, RNG1 As Range, N%, RNG2 As Range, rng3 As Range
Set RNG = Range("B1:B17")
Set RNG2 = Range("d2:d4")
For Each rng3 In RNG2 '数量判定
For Each RNG1 In RNG '原始数据循环
If RNG1 = rng3 Then
N = N + 1
If N <= rng3(1, 2) Then
Cells(Rows.Count, "d").End(xlUp)(2, 1) = RNG1(1, 0)
Cells(Rows.Count, "e").End(xlUp)(2, 1) = RNG1
End If
End If
Next
N = 0
Next
End Sub
[d9] = "辅助1"
[E9] = "辅助2"
Dim RNG As Range, RNG1 As Range, N%, RNG2 As Range, rng3 As Range
Set RNG = Range("B1:B17")
Set RNG2 = Range("d2:d4")
For Each rng3 In RNG2 '数量判定
For Each RNG1 In RNG '原始数据循环
If RNG1 = rng3 Then
N = N + 1
If N <= rng3(1, 2) Then
Cells(Rows.Count, "d").End(xlUp)(2, 1) = RNG1(1, 0)
Cells(Rows.Count, "e").End(xlUp)(2, 1) = RNG1
End If
End If
Next
N = 0
Next
End Sub
2020-03-23
展开全部
COUNTIFS第几次出现法把某组出现的位置求出来,然后简单的一个高级筛选。就可以了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
写代码可以处理,需要文档
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把问题作为内容(邮件主题一定要包含“excel”,本人以此为依据辨别非垃圾邮件,以免误删),excel样表文件(尽量详细说明现状和目标效果)作为附件发到yqch134@163.com帮你看下
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询