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

[µo°Ý] ¦p¦ó·j´M¤£¦P¤À­¶ªº¬Û¦P¦WºÙÄæ¦ì(¦WºÙµL±Æ§Ç)¨Ã±ø¦C¥X¨Ó~

[µo°Ý] ¦p¦ó·j´M¤£¦P¤À­¶ªº¬Û¦P¦WºÙÄæ¦ì(¦WºÙµL±Æ§Ç)¨Ã±ø¦C¥X¨Ó~

¥»©«³Ì«á¥Ñ citizen0923 ©ó 2015-9-14 21:25 ½s¿è

¦U¦ì«e½ú¦n¡G

Ãö©ó¦p¦ó·j´M¤£¦P¤À­¶ªº¬Û¦P¦WºÙÄæ¦ì(¦WºÙµL±Æ§Ç)¨Ã±ø¦C¥X¨Ó¡A¤p§Ì¤£¤~¤wª¦¤å¨â¤T¤ÑÁÙ¬O¤£ª¾±q¦ó¤U¤â~

¥Ø¼Ð¦p¤U:
--------
¤À­¶A:[·j´M}
·j´MAAA
¸õ¥X
AAA ²Ä1µ§¸ê®Æ
AAA ²Ä2µ§¸ê®Æ
AAA ²Ä3µ§¸ê®Æ
--------
¤À­¶B:[¦Cªí]
AAA ²Ä1µ§¸ê®Æ
BBB  ²Ä1µ§¸ê®Æ
AAA ²Ä2µ§¸ê®Æ
--------
¤À­¶C:[¦Cªí]
BBB ²Ä1µ§¸ê®Æ
AAA  ²Ä3µ§¸ê®Æ
BBB ²Ä2µ§¸ê®Æ
--------
==============================
¥Ø«e¯à¸Õ¥X¨Óªº¤è¦¡¥u¯à¦b¦P¤@­Ó¤À­¶¸Ì­±¹F¦¨³o­Ó¥\¯à
¤À­¶A:[·j´M+¦Cªí}
AAA ²Ä1µ§¸ê®Æ
BBB  ²Ä1µ§¸ê®Æ
AAA ²Ä2µ§¸ê®Æ

·j´MAAA
AAA ²Ä1µ§¸ê®Æ
AAA ²Ä2µ§¸ê®Æ

==============================
¥H¤W¨â­ÓÀɮ׽аѾ\ªþ¥óªº
­ì©lÀɤΥؼÐ.zip (17.6 KB)
==============================
ÁÙ¬O·Q¤£³z¦p¦ó·j´M¸ó¤À­¶ªº¸ê®Æ¡A
§Æ±æ¦U¦ì¤j¤j¯à°÷À°¦£«üÂI°g¬z~~¦³³Ò«e½ú¶O¤ß¤FÁÂÁÂ

¤£¦n·N«ä~ §Ñ¤F´£¨ì­n¬O¦³¥ÎVBAªº¸Ñªk¤]¥i³á~ ¦A³Â·Ð¤j®a¤F~~

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-9-15 09:35 ½s¿è

¦^´_ 2# citizen0923
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Sh As Worksheet, xlWord As String, Ar(), xAr(), i As Integer, x As Integer
  4.     xlWord = Sheets("¬d¸ß").Range("B1")  '­n¬d¸ßªº½s¸¹
  5.     For Each Sh In Sheets                'Sheets: ¬¡­¶Ã¯ªº¤u§@ªíª«¥ó¶°¦X
  6.         If Sh.Name <> "¬d¸ß" Then
  7.             Ar = Sh.UsedRange.Value      'UsedRange(¤Gºû°}¦C): ¤u§@ªí¨Ï¥Îªº½d³ò
  8.             For i = 1 To UBound(Ar)
  9.                 If UCase(Ar(i, 1)) = UCase(xlWord) Then
  10.                     ReDim Preserve xAr(x) '­«¸m°}¦C¤¸¯Àªº¯Á¤Þ­È,Preserve:«O¯d­ì¦³ªº¤¸¯À
  11.                     xAr(x) = Application.Index(Ar, i)  'Ū¨ú¤Gºû°}¦C¤¤¤¸¯À
  12.                     x = x + 1
  13.                 End If
  14.             Next
  15.         End If
  16.     Next
  17.     With Sheets("¬d¸ß").UsedRange.Offset(4) '³o½d³ò¤U²¾4¦Cªº½d³ò
  18.         .Value = ""
  19.         If x > 0 Then
  20.             .Cells(1).Resize(x, UBound(Ar, 2)) = Application.Transpose(Application.Transpose(xAr))
  21.             Application.Transpose'Âà¸m¨ç¼Æ
  22.         End If
  23.         MsgBox "¬d¸ß " & IIf(x = 0, "¤£¨ì ", "") & xlWord & IIf(x > 0, " OK!", "")
  24.     End With
  25. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

°ò¥»ªº¡e¿z¿ï¡fªk¡G
  1. Sub ¿z¿ï¶K¤J()
  2. Dim xStr$, xS As Worksheet, xName$, xE As Range
  3. With ActiveSheet
  4. ¡@¡@Range(.[A1], .UsedRange).Offset(4, 0).EntireRow.Delete
  5. ¡@¡@xName = .Name
  6. ¡@¡@xStr = .[B1]
  7. ¡@¡@If xStr = "" Then Exit Sub
  8. End With
  9. ¡@
  10. For Each xS In Sheets
  11. ¡@If xS.Name <> xName Then
  12. ¡@¡@¡@With xS.UsedRange
  13. ¡@¡@¡@¡@¡@.AutoFilter Field:=1, Criteria1:=xStr
  14. ¡@¡@¡@¡@¡@.Offset(1, 0).Copy [A65536].End(xlUp)(2)
  15.        ¡@ End With
  16. ¡@¡@¡@xS.AutoFilterMode = False
  17. ¡@End If
  18. Next
  19. End Sub
½Æ»s¥N½X
¡@
ªþ¥ó¤U¸ü¡G
Xl0000101.rar (10.48 KB)
¡@

TOP

«e½ú¤é¦w¡A°Ñ¦ÒVBA¸Ñªk«á¤w¸g¥i¥H¥¿±`¨Ï¥Î¤F¡A¯uªº¤£³Ó·P¿E

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD