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

[µo°Ý] ¦p¦ó¥ÎVBA¥[±j"´M§ä¤Î¨ú¥N"¥\¯à

[µo°Ý] ¦p¦ó¥ÎVBA¥[±j"´M§ä¤Î¨ú¥N"¥\¯à

¥»©«³Ì«á¥Ñ jesscc ©ó 2019-2-24 22:56 ½s¿è

Excelªº"´M§ä¤Î¨ú¥N"¥\¯à¡A¥i¥H¥Î"¥þ³¡´M§ä"§â§t¦³ÃöÁä¦rªº¸ê®Æ¥þ³¡§ä¥X¡A¦ý¬O¥¦¥u¯à«ü¥X³o¨Ç¸ê®Æ©Ò¦bªºÀx¦s®æ¡C
§Ú·Q¥Î¤W­±³oºØ¤è¦¡¦b°£¤F¤u§@ªí("¾ã¦X¬d¸ß")¥H¥~ªº¨ä¥L©Ò¦³¤u§@ªí¡A§ä¥X©Ò¦³ÃöÁä¦r¡A¨Ã±N¦³ÃöÁä¦r¨º¤@¦C¨ä¤¤´X­ÓÄæ¦ìªº¸ê®Æ¶ñ¤J¨ì¤u§@ªí("¾ã¦X¬d¸ß")(¦p¹Ï)¡A¸Ó«ç»ò°µ©O?
¦Û¤v¼g¤F¤@³¡¥÷¡A¦ý¬O°õ¦æ¤£¥¿±`¡A¤£ª¾¦p¦ó­×§ï(¦b¤u§@ªí("¾ã¦X¬d¸ß")ªºD3¿é¤JÃöÁä¦r¬d¸ß)¡C
PS:¦P®É§Æ±æ¯à¦b¤u§@ªí("¾ã¦X¬d¸ß")ªºBÄæÅã¥Ü¸Óµ§¸ê®Æ©Ò¦b¤u§@ªíªº¦WºÙ¡C

Test.rar (20.24 KB)
Jess

Sub ¬d¸ß()
Dim Arr, Brr, T$, Sht As Worksheet, i&, j%, Mr, N&
T = [D3]: If T = "" Then MsgBox "¥¼¿é¤J¬d¸ß¦r¦ê!! ": Exit Sub
[B7:M3000].ClearContents
Mr = Array(1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
ReDim Brr(1 To 30000, 1 To 12)
For Each Sht In Sheets
    If Sht.Name = "¾ã¦X¬d¸ß" Then GoTo 101
    Arr = Sht.UsedRange
    For i = 2 To UBound(Arr)
        If InStr(Arr(i, 4), T) Then
           N = N + 1: Brr(N, 1) = Sht.Name
           For j = 1 To 11: Brr(N, j + 1) = Arr(i, Mr(j - 1)): Next
        End If
    Next i
101: Next
If N > 0 Then [B7:M7].Resize(N) = Brr
End Sub

TOP

ÁÂÁ­ã¤jªºÀ°¦£
Jess

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD