- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¦^´_ 5# terrykyo520
¸Õ¸Õ¡I- Public Sub ex()
- Dim ar()
- arr = Range("a2:C" & Cells(Rows.Count, 1).End(xlUp).Row)
- k = UBound(arr)
- For i = 1 To UBound(arr) - 1
- For j = i + 1 To UBound(arr)
- If arr(i, 1) = "" Or arr(j, 1) = "" Then GoTo 10
- If arr(i, 2) & arr(i, 3) = arr(j, 2) & arr(j, 3) Then
- arr(j, 1) = ""
- arr(j, 2) = ""
- arr(j, 3) = ""
- k = k - 1
- End If
- 10:
- Next
- Next
- ReDim ar(1 To k, 1 To 3)
- k = 1
- For i = 1 To UBound(arr)
- If arr(i, 1) <> "" Then
- ar(k, 1) = arr(i, 1)
- ar(k, 2) = arr(i, 2)
- ar(k, 3) = arr(i, 3)
- k = k + 1
- End If
- Next
- Range("a2:C" & Cells(Rows.Count, 1).End(xlUp).Row).Clear
- [a2].Resize(UBound(ar), 3) = ar
- End Sub
½Æ»s¥N½X |
|