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

filter«¬ºA¤£²Å¦X

¦^´_ 5# °a¤ªºµ


ÁÂÁ½Ѧ찪¤â
§Ú¦¨¥\¤F
ÁÂÁÂ!

TOP

ReDim B(LBound(K) To UBound(K))
ReDim Preserve B(LBound(K) To UBound(K))
Erase B

³o¬q¤]¤£¥Î ....XD

TOP

­è¤~¸ÕµÛ§â  For x = 2 To Sheets.Count °j°é§R°£ µ²ªGµo²{ ®Ú¥»¥Î¤£¨ì ........XD

TOP

¥»©«³Ì«á¥Ñ °a¤ªºµ ©ó 2020-8-1 19:23 ½s¿è
  1. §Ú¤]¬O·s¤â¶¶«K½m²ß¤@¤U ¤£¹L³o¬q¦n¹³­þ¸Ì©Ç©Çªº  ¦ý§Ú¬Ý¤£¥X¨Ó ½Ð¤j¤j­Ì À°À°¦£ ¸Ó¦p¦ó­×§ï ·Pı ¦n¹³°j°é ¤Ó¦h ¤£¥²­nªº¥N½X ¦n¹³«Ü¦h 0.0
  2. Public Sub ½m²ß¸ó¤u§@ªí°}¦C½m²ß()

  3.     For x = 2 To Sheets.Count
  4.         Sheets(x).Cells.Clear
  5.         Sheets(1).Rows(1).Copy Sheets(x).Rows(1)
  6.     Next x
  7.    
  8.     E = 2
  9.     A = Array("¤T°Ó", "»·ªF", "«H¸q")
  10.     K = Range(Cells(2, 1), Cells(2, 3).End(xlDown))
  11.     ReDim B(LBound(K) To UBound(K))
  12.     ReDim Preserve B(LBound(K) To UBound(K))

  13.     For x = 2 To Sheets.Count
  14.         For J = LBound(K) To UBound(K)
  15.             For I = LBound(A) To UBound(A)
  16.             If A(I) <> K(J, 2) Then E = 2
  17.                 If A(I) = K(J, 2) Then
  18.                 If Sheets(K(J, 2)).Cells(E, 1) <> "" Then E = E + 1
  19.                     Sheets(K(J, 2)).Cells(E, 1) = K(J, 1)
  20.                     Sheets(K(J, 2)).Cells(E, 2) = K(J, 2)
  21.                     Sheets(K(J, 2)).Cells(E, 3) = K(J, 3)
  22.                     E = E + 1
  23.                 End If
  24.             Next I
  25.         Next J
  26.     Exit For
  27.     Next x
  28.    
  29.     Erase A, K, B
  30.    
  31. End Sub
½Æ»s¥N½X

TOP

¦U¦ì°ª¤â¡A¯uªººÉ¤O¤F~filter¤@ª½·d¤£©w¡A¥Î¥t¥~¤@ºØ¼gªk¡A¼g¨ì³o¸Ì¡A¤£ª¾¹D°ÝÃD¦b­þ¡AµLªk±N¾ã¦C½Æ»s¨ì«ü©w¤u§@ªíªº³Ì«á¤@Äæ¡AÁÂÁ¦U¦ì°ª¤â
  1. Sub °j°é1()

  2. All = Array("¤T°Ó", "»·ªF")

  3. For r = ActiveSheet.UsedRange.Rows.Count To 1 Step -1
  4.    
  5.     For i = 0 To UBound(All)
  6.    
  7.         If Cells(r, 2) = All(i) Then
  8.             Rows(r).EntireRow.Copy
  9.             Sheets(All).Select
  10.             ActiveSheet.Paste
  11.             Exit For
  12.         End If
  13.         
  14.     Next
  15. Next

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

TOP

°ò¥»¾Þ§@¥\¯à--¿z¿ï, À³¥i³B²z³o­Ó°ÝÃD,
¥ý¨Ï¥Î¿ý»s¨ú±oµ{¦¡½X...¬ã¨s¤U...

¦³°ÝÃD¦A´£~~

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-8-1 02:48 ½s¿è

¦^´_ 1# ssooi


¦]¬°§AªºFilter ¥Îªk¿ù°Õ~~

²Ä1­Ó°Ñ¼Æ­n©ñ¤J "°}¦C"¡A²Ä2­Ó°Ñ¼Æ­n©ñ¤J "¦r¦ê"

ªì¾ÇªÌ½Ðµ½¥Î "F1" ¨Ó¬d¥Îªk






©Ò¥H¨Ì§Aªºµ{¦¡  Filter(a,all(i)) ­n§ï¦¨ Filter(all,a)

­è¦n¦³­Ó½d¨Ò¥i¥H¥ÎFilter¥Ü½dµ¹§A¬Ý¡A¦p¤UÃìµ²


http://forum.twbts.com/thread-8370-1-1.html

¤£¹L§Aªºµ{¦¡¤£¥u³o­Ó°ÝÃD......

¦³¤£¤Ö»yªk¿ù»~¡AÁÙ¦³ÅÞ¿è°ÝÃD......

§AªºIF¥i¯à¥Ã»·¶i¤£¥h......¶i¥h¤F¤]·|°õ¦æ¥¢±Ñ

¦A¥[ªo§a!
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : §Ú­Ì³Ì¤jªº¼Ä¤H¤£¬O§O¤H¡D¥i¯à¬O¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD