- ©«¤l
- 45
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 59
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-2-6
- ³Ì«áµn¿ý
- 2019-6-22
|
¤£¦n·N«äɼÐÃD°Ý¤@¤U,
¦³¸ÕµÛ±Nlpk187¤jªºµ{¦¡½X²¤°µ×§ï,
¦]¬°¹ïVBA¯uªºÁÙ¬O·s¤âµ{«×,©Ò¥Hק諸³¡¥÷°µ±o«Ü¤£¦n,
¥ý²z¥Ø«e§Æ±æ¹F¨ìªº®ÄªG:
1.Y¨â¾î¦CªºJÄæ¼ÆȤ£¦P,LÄæ¼ÆȬۦP,
«h¶È²M°£¨ä¤¤¤@¾î¦CªºLÄæ¼ÆÈ,¨â¾î¦C§¡¤£§R°£.
2.¸ò¤Wz³W«hÃþ¦ü,
Y¨â¾î¦CªºJÄæ¼ÆȬۦP,LÄæ¼ÆȤ£¦P,
«h¶È²M°£¨ä¤¤¤@¾î¦CªºJÄæ¼ÆÈ,¨â¾î¦C§¡¤£§R°£.
3.Y¨â¾î¦CªºJÄæ¼ÆȤÎLÄæ¼Æȧ¡¬°ªÅ¥Õ,
«h¨â¾î¦C§¡§R°£.
קï«áµ{¦¡½X¦p¤U:- Public Sub extwo()
- Dim ar()
- Range("c2").Resize(Cells(Rows.Count, 3).End(xlUp).Row, 1).Select
- Selection.Resize(Selection.Rows.Count - 1, 1).Select
- Selection.Copy Range("a2")
- arr = Range("A2:AD" & 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, 11) & arr(i, 13) = arr(j, 11) & arr(j, 13) Then
- For L = 1 To UBound(arr, 2)
- arr(j, L) = ""
- Next
- K = K - 1
- ElseIf arr(i, 11) = arr(j, 11) And arr(i, 13) <> arr(j, 13) Then
- If arr(i, 13) = "" Then
- arr(i, 11) = ""
- Else
- arr(j, 11) = ""
- End If
- ElseIf arr(i, 11) <> arr(j, 11) And arr(i, 13) = arr(j, 13) Then
- If arr(i, 11) = "" Then
- arr(i, 13) = ""
- Else
- arr(j, 13) = ""
- End If
- ElseIf arr(i, 11) = "" And arr(i, 13) = "" Then
- arr(i, 1) = ""
- ElseIf arr(j, 11) = "" And arr(j, 13) = "" Then
- arr(j, 1) = ""
- '
- End If
-
- 10:
- Next
- Next
- ReDim ar(1 To K, 1 To UBound(arr, 2))
- K = 1
- For i = 1 To UBound(arr)
- If arr(i, 1) <> "" Then
- For L = 1 To UBound(arr, 2)
- ar(K, L) = arr(i, L)
- Next
- K = K + 1
- End If
- Next
- Range("a2:AD" & Cells(Rows.Count, 1).End(xlUp).Row).Clear
- [a2].Resize(UBound(ar), UBound(arr, 2)) = ar
- Columns(1).ClearContents
- [L2].Select
- End Sub
½Æ»s¥N½X ¥Ø«eªº°ÝÃD¦b©ó,
´ú¸Õ¤Ö¶q¸ê®Æ®É(¤ñ¦p»¡10µ§¥H¤º),
¬Ý¦ü¨S¦³°ÝÃD,
¦ý¬OY´ú¸Õ¤j¶q¸ê®Æ®É,
¥ÎEXCEL2007ªº¤º«Øªº®æ¦¡¤Æ±ø¥ó³]©w,
¥h¼Ð¥X«½ÆªºÈ®É,
·|µo²{ÁÙ¬O¦³«Ü¦h«½Æ¸ê®Æ¨S³Q§R°£,
»Ý¦A¶]²Ä¤G¦¸µ{¦¡½X,
¤~·|²M°£,
¤£ª¾°ÝÃD¥X¦bþ¸Ì,
ÁÙ±æ«e½ú¤£§[«üÂI,¤Q¤À·PÁÂ. |
|