|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Function AJIANGE(数据区域, 条件区域)
- arr = 数据区域
- brr = 条件区域
- If Not IsArray(brr) Then
- Dim br(1 To 1, 1 To 1)
- br(1, 1) = brr
- brr = br
- End If
- ReDim abrr(999) As Boolean, a1rr(UBound(arr))
- ReDim crr(1 To UBound(brr), 1 To 1)
- k = -1
- For i = UBound(arr) To 1 Step -1
- Do While arr(i, 1) = ""
- i = i - 1
- Loop
- If Not abrr(arr(i, 1)) Then
- k = k + 1
- abrr(arr(i, 1)) = True
- a1rr(k) = arr(i, 1)
- End If
- Next
- For i = UBound(brr) To 1 Step -1
- Do While brr(i, 1) = ""
- crr(i, 1) = ""
- i = i - 1
- If i < 1 Then Exit For
- Loop
- crr(i, 1) = a1rr(brr(i, 1))
- Next
- AJIANGE = crr
- End Function
复制代码 |
评分
-
2
查看全部评分
-
|