ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] [¦r¨åª«¥ó]¦C¥X¦U¤u§@ªí¯S©w­È°ÝÃD

[µo°Ý] [¦r¨åª«¥ó]¦C¥X¦U¤u§@ªí¯S©w­È°ÝÃD

¦U¦ì«e½ú¦n,
¤p§Ì¥Ø«e¦b½m²ß®É¹J¨ì¤@­Ó°ÝÃD,
²­z°ÝÃD¦p¤U:
°²³]¦³¤@¬¡­¶Ã¯,¦@¦³4­Ó¤u§@ªí,3­Ó§t¦³¸ê®Æ,²Ä4­Ó°µ¬°Åã¥Üµ²ªG¥Î,
(¨ä¹ê·íµM¬O§Æ±æ¤£¥u3­Ó,¦ý¥Ø«e¶È°µ¬°½m²ß¥Î,¬G¥ý°²©w3­Ó)
«e3­Ó¤u§@ªí¤º§¡¦³3Äæ,
²Ä1Ä欰½s¸¹,²Ä2Ä欰¦WºÙ,²Ä3Ä欰¼Æ¾Ú.
§Æ±æ¥i¥H±N3­Ó¤u§@ªí¤º²Ä2Äæ¦WºÙ¬°"A"ªº¼Æ¾Ú§ä¥X,§R°£­«½Æ¼Æ¾Ú¨Ã¶K¦Ü²Ä4­Ó¤u§@ªí,²Ä1Äæ«h­«·s½s¸¹.
¤p§Ì¦³¸ÕµÛ­×§ï«e½úªºµ{¦¡½X,¦ýµ²ªG¤£¬Æ²z·Q,¤£ª¾°ÝÃD¥X¦b­þ¸Ì,
¤æÁx¤W¨Óµo°Ý,ÁÙ±æ«e½ú¤£§[«üÂI°g¬z,¤Q¤À·PÁÂ.


ªþ¤WÀɮפε{¦¡½X¥H¨Ñ«e½ú°Ñ¦Ò:

µù:"§Æ±æµ²ªG"¤À­¶ªºA-CÄæ¬O©Ò´Á±æªº¹B¦æµ²ªG,
¦ý¥Ø«eµ{¦¡¹ê»Ú¹B¦æªºµ²ªG·|Åã¥Ü¦b"§Æ±æµ²ªG"¤À­¶ªºF¦ÜHÄæ.

20161101-¦C¥X¦U¤u§@ªí¯S©w­È°ÝÃD.zip (13.12 KB)
  1. '¦¹¬°°Ñ¦ÒªO¤W«e½úµ{¦¡½X¶i¦æ­×§ï,«D§Ú­ì³Ð
  2. '½×¾Âºô§}:http://forum.twbts.com/
  3. Public Sub test()
  4. Dim arr(), brr(), myD, mNum

  5. Set myD = CreateObject("scripting.dictionary")

  6. ReDim brr(1 To 65536, 1 To 3)
  7. Sheets(1).Activate
  8. For Each sht In Sheets

  9. arr = Range("a2:c" & Cells(Rows.Count, 1).End(xlUp).Row)

  10. If sht.Name <> "§Æ±æµ²ªG" Then

  11. sht.Activate

  12. n = n + 1

  13. For i = 1 To UBound(arr)

  14. T = arr(i, 3)

  15. If myD(T) = 1 Then GoTo 101

  16. If arr(i, 2) <> "A" Then GoTo 101

  17. For j = 2 To 3

  18. brr(n, 1) = n
  19. brr(i, j) = arr(i, j)

  20. Next j

  21. myD(T) = 1

  22. 101:

  23. Next i
  24. End If

  25. Next sht

  26. Sheets(4).Activate

  27. If n > 0 Then [f2].Resize(n, 3) = brr

  28. End Sub
½Æ»s¥N½X

Public Sub test()
Dim Arr, Brr, myD, T$, N&, Sht As Worksheet
Set myD = CreateObject("scripting.dictionary")
ReDim Brr(1 To 65536, 1 To 3)
For Each Sht In Sheets
¡@¡@If Sht.Name <> "§Æ±æµ²ªG" Then
¡@¡@¡@¡@Arr = Sht.Range("a1:c" & Sht.Cells(Rows.Count, 1).End(xlUp).Row)
¡@¡@¡@¡@For i = 2 To UBound(Arr)
¡@¡@¡@¡@¡@¡@If Arr(i, 2) <> "A" Then GoTo 101
¡@¡@¡@¡@¡@¡@T = Arr(i, 3): If myD(T) = 1 Then GoTo 101
¡@¡@¡@¡@¡@¡@N = N + 1
¡@¡@¡@¡@¡@¡@Brr(N, 1) = N
¡@¡@¡@¡@¡@¡@For j = 2 To 3:  Brr(N, j) = Arr(i, j): Next j
¡@¡@¡@¡@¡@¡@myD(T) = 1
101: Next i
¡@¡@¡@End If
Next Sht
Sheets("§Æ±æµ²ªG").Activate
If N > 0 Then [f2].Resize(N, 3) = Brr
End Sub
¡@
¡@

TOP

¦^´_ 2# ­ã´£³¡ªL

«D±`·PÁ²a´£³¡ªL«e½úªº«ü¥¿,
¤p§Ì¤Q¤ÀºF·\,ı±o¦Û¤v¶i®i¤ÓºC¤F,ÁÙ±o§V¤O¾Ç²ß.
¦A¦¸·PÁ«e½úµL¨p«üÂI.

TOP

        ÀR«ä¦Û¦b : ¤Ó¶§¥ú¤j¡B¤÷¥À®¦¤j¡B§g¤l¶q¤j¡A¤p¤H®ð¤j¡C
ªð¦^¦Cªí ¤W¤@¥DÃD