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

¶×¤JÁ`ªí¼Æ¾Úbug

¶×¤JÁ`ªí¼Æ¾Úbug

¦U¦ì¤j¤j¦n¡Aªì¨Ó¥E¨ì·Q¸ß°Ý¤@­Óµ{¦¡»y¨¥
¤p§Ì¹J¨ìª¬ªp¦p¤U
1.±N5­Ó±M®×¤À§O¥H½Æ»s¤è¦¡¶K¤W"¸gºÞªí®æ" (OK)
2.¶K¤W«á¦A±NCÄæ¿ï¨ú½d³ò¶×¤J"Á`ªí" (¤£OK)
¤£OKªº­ì¦]¬O...
·í¶×¤J¹L¥h«á¡A¥þ³¡¼Æ­È·|Åܦ¨¤@¼Ëªº(¨D¸Ñ)
¦]¬°¼gªº³o­Óµ{¦¡½X·Pı«Ü¼É¤O¡A¬O§_¦³¤ñ¸û²³æªº¼gªk?(¨D¸Ñ)

¥H¤U¬Oµ{¦¡½X¡A¦A³Â·Ð¦U¦ì¨ó§U°£¿ù!!! ·P®¦·P®¦
Sub summary2()

    ¤u§@ªí1.Activate
   
    'If Sheet <> ±M®× Then Exit Sub '«D¦³±M®×ªº¼ÐÃD ¤£°Ê§@
    For j = 3 To 7
        For i = 2 To 6
        
           Range("B3:D58").ClearContents
           Sheets(j).Range("B3:D58").Copy Destination:=[b3]
   
               
            ¤u§@ªí7.Cells(4, i) = [c3]
            ¤u§@ªí7.Cells(5, i) = [c5]
            ¤u§@ªí7.Cells(6, i) = [c6]
            ¤u§@ªí7.Cells(7, i) = [c7]
            ¤u§@ªí7.Cells(8, i) = [c8]
            ¤u§@ªí7.Cells(9, i) = [c9]
            ¤u§@ªí7.Cells(10, i) = [c10]
            ¤u§@ªí7.Cells(11, i) = [c11]
            ¤u§@ªí7.Cells(12, i) = [c12]
            ¤u§@ªí7.Cells(13, i) = [c13]
            ¤u§@ªí7.Cells(14, i) = [c14]
            ¤u§@ªí7.Cells(15, i) = [c15]
            ¤u§@ªí7.Cells(16, i) = [c16]
            ¤u§@ªí7.Cells(17, i) = [c17]
            ¤u§@ªí7.Cells(18, i) = [c18]
            ¤u§@ªí7.Cells(19, i) = [c19]
            ¤u§@ªí7.Cells(20, i) = [c20]
            ¤u§@ªí7.Cells(21, i) = [c21]
            ¤u§@ªí7.Cells(22, i) = [c22]
            ¤u§@ªí7.Cells(23, i) = [c23]
            ¤u§@ªí7.Cells(24, i) = [c24]
            ¤u§@ªí7.Cells(25, i) = [c25]
            ¤u§@ªí7.Cells(26, i) = [c26]
            ¤u§@ªí7.Cells(27, i) = [c27]
            ¤u§@ªí7.Cells(28, i) = [c28]
            ¤u§@ªí7.Cells(29, i) = [c29]
            ¤u§@ªí7.Cells(30, i) = [c30]
            ¤u§@ªí7.Cells(31, i) = [c31]
            ¤u§@ªí7.Cells(32, i) = [c32]
            ¤u§@ªí7.Cells(33, i) = [c33]
            ¤u§@ªí7.Cells(34, i) = [c34]
            ¤u§@ªí7.Cells(35, i) = [c35]
            ¤u§@ªí7.Cells(36, i) = [c36]
            ¤u§@ªí7.Cells(37, i) = [c37]
            ¤u§@ªí7.Cells(38, i) = [c38]
            ¤u§@ªí7.Cells(39, i) = [c39]
            ¤u§@ªí7.Cells(40, i) = [c40]
            ¤u§@ªí7.Cells(41, i) = [c41]
            ¤u§@ªí7.Cells(42, i) = [c42]
            ¤u§@ªí7.Cells(43, i) = [c43]
            ¤u§@ªí7.Cells(44, i) = [c44]
            ¤u§@ªí7.Cells(45, i) = [c45]
            ¤u§@ªí7.Cells(46, i) = [c46]
            ¤u§@ªí7.Cells(47, i) = [c47]
            ¤u§@ªí7.Cells(48, i) = [c48]
            ¤u§@ªí7.Cells(49, i) = [c49]
            ¤u§@ªí7.Cells(50, i) = [c50]
            ¤u§@ªí7.Cells(51, i) = [c51]
            ¤u§@ªí7.Cells(52, i) = [c52]
            ¤u§@ªí7.Cells(53, i) = [c53]
            ¤u§@ªí7.Cells(54, i) = [c54]
            ¤u§@ªí7.Cells(55, i) = [c55]
            ¤u§@ªí7.Cells(56, i) = [c56]
            ¤u§@ªí7.Cells(57, i) = [c57]
            ¤u§@ªí7.Cells(58, i) = [c58]
            
           
         Next
    Next
   
    ¤u§@ªí7.Activate
   
   

End Sub

¶×¤J¶¶§Ç

¹Ï¤ù.png

¼Æ­È³£¬O¤@¼Ëªº

¹Ï¤ù2.jpeg

¤u§@ªí¼Æ¶q

¹Ï¤ù3.PNG

¦^´_ 1# waitto04

¤è«Kªþ¤WÀɮסAÁÂÁÂ

TOP

¦^´_ 2# samwang


    ½Ð°Ñ¦Ò!!  ÁÂÁÂ!!
    ¼Ò²Õ¥D­n©ñ¦bmodul1

¸gºÞ·|ªí®æ³ø§i.zip (250.54 KB)

ªþ¥ó

TOP

¼g¥X¤F¥t¤@­Ó¥i¥H¾É¤Jªº
µ²ªGÅܦ¨¤FBÄæ³Q¸õ¹L¤F...´d¼@...

Sub test()

    ¤u§@ªí1.Activate
    Set i = ¤u§@ªí1.Range("C5:C58")
        For j = 2 To 7
        
           Range("B358").ClearContents
           Sheets(j).Range("B358").Copy Destination:=[b3]
        
               
            ¤u§@ªí7.Cells(4, j) = [c3]
            ¤u§@ªí7.Cells(5, j) = [c5]
            ¤u§@ªí7.Cells(6, j) = [c6]
            ¤u§@ªí7.Cells(7, j) = [c7]
            ¤u§@ªí7.Cells(8, j) = [c8]
            ¤u§@ªí7.Cells(9, j) = [c9]
            ¤u§@ªí7.Cells(10, j) = [c10]
            ¤u§@ªí7.Cells(11, j) = [c11]
            ¤u§@ªí7.Cells(12, j) = [c12]
            ¤u§@ªí7.Cells(13, j) = [c13]
            ¤u§@ªí7.Cells(14, j) = [c14]
            ¤u§@ªí7.Cells(15, j) = [c15]
            ¤u§@ªí7.Cells(16, j) = [c16]
            ¤u§@ªí7.Cells(17, j) = [c17]
            ¤u§@ªí7.Cells(18, j) = [c18]
            ¤u§@ªí7.Cells(19, j) = [c19]
            ¤u§@ªí7.Cells(20, j) = [c20]
            ¤u§@ªí7.Cells(21, j) = [c21]
            ¤u§@ªí7.Cells(22, j) = [c22]
            ¤u§@ªí7.Cells(23, j) = [c23]
            ¤u§@ªí7.Cells(24, j) = [c24]
            ¤u§@ªí7.Cells(25, j) = [c25]
            ¤u§@ªí7.Cells(26, j) = [c26]
            ¤u§@ªí7.Cells(27, j) = [c27]
            ¤u§@ªí7.Cells(28, j) = [c28]
            ¤u§@ªí7.Cells(29, j) = [c29]
            ¤u§@ªí7.Cells(30, j) = [c30]
            ¤u§@ªí7.Cells(31, j) = [c31]
            ¤u§@ªí7.Cells(32, j) = [c32]
            ¤u§@ªí7.Cells(33, j) = [c33]
            ¤u§@ªí7.Cells(34, j) = [c34]
            ¤u§@ªí7.Cells(35, j) = [c35]
            ¤u§@ªí7.Cells(36, j) = [c36]
            ¤u§@ªí7.Cells(37, j) = [c37]
            ¤u§@ªí7.Cells(38, j) = [c38]
            ¤u§@ªí7.Cells(39, j) = [c39]
            ¤u§@ªí7.Cells(40, j) = [c40]
            ¤u§@ªí7.Cells(41, j) = [c41]
            ¤u§@ªí7.Cells(42, j) = [c42]
            ¤u§@ªí7.Cells(43, j) = [c43]
            ¤u§@ªí7.Cells(44, j) = [c44]
            ¤u§@ªí7.Cells(45, j) = [c45]
            ¤u§@ªí7.Cells(46, j) = [c46]
            ¤u§@ªí7.Cells(47, j) = [c47]
            ¤u§@ªí7.Cells(48, j) = [c48]
            ¤u§@ªí7.Cells(49, j) = [c49]
            ¤u§@ªí7.Cells(50, j) = [c50]
            ¤u§@ªí7.Cells(51, j) = [c51]
            ¤u§@ªí7.Cells(52, j) = [c52]
            ¤u§@ªí7.Cells(53, j) = [c53]
            ¤u§@ªí7.Cells(54, j) = [c54]
            ¤u§@ªí7.Cells(55, j) = [c55]
            ¤u§@ªí7.Cells(56, j) = [c56]
            ¤u§@ªí7.Cells(57, j) = [c57]
            ¤u§@ªí7.Cells(58, j) = [c58]
        
    Next
   
    ¤u§@ªí7.Activate
   
    'Columns("B:B").Delete
   
   

End Sub

TOP

¦^´_ 3# waitto04

½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test()
Dim Arr, xD, T$, i&, j%
Set xD = CreateObject("Scripting.Dictionary")
For Each sh In Sheets
    If InStr(sh.Name, "±M®×") Then
        With sh
            Arr = .[a1].CurrentRegion
            For i = 5 To UBound(Arr)
                If Arr(i, 3) = "" Then GoTo 90
                T = sh.Name & "|" & Arr(i, 1)
                xD(T) = Arr(i, 3)
90:         Next
        End With
    End If
Next
With Sheets(1)
    [b5:f58] = ""
    Arr = .[a1].CurrentRegion
    For i = 5 To UBound(Arr): For j = 2 To UBound(Arr, 2)
        T = Arr(4, j) & "|" & Arr(i, 1)
        Arr(i, j) = xD(T)
    Next: Next
    .[a1].Resize(UBound(Arr), UBound(Arr, 2)) = Arr
End With
End Sub

TOP

¦^´_ 5# samwang


   
³o­Ó¨S¿ìªk§@·~...
¨S¦³bug ¦ý¬OÁ`ªí¨S¦³¥Í¦¨

TOP

¦^´_  samwang


   
³o­Ó¨S¿ìªk§@·~...
¨S¦³bug ¦ý¬OÁ`ªí¨S¦³¥Í¦¨
waitto04 µoªí©ó 2022-5-29 09:59


§Ú´ú¸Õ¨S°ÝÃD¦pªþ¥ó¡A¤ñ¹ï±ø¥ó¦p·Ó¤ù(¤u§@ªí¦WºÙ+¶µ¥Ø)¦³²Å¦X´N±a¤J¼Æ¾Ú¡A
½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
1.JPG

²¤Æª©_0529.zip (136.38 KB)

TOP

¦^´_ 7# samwang


    ·PÁ§A¤£¹½¨ä·Ðªº´ú¸Õ!!
¦ý¨S¿ìªk¦¨¥\¤Þ¤J...¤Ï¦Ó­ì¦³ªº"¸gºÞªí®æ"¤º®e¤]³Q²MªÅ¤F!!
¦³©w¸q§@¥Î­¶­±¬O¦b­þ­Ó¶Ü?
Â^¨ú1.PNG

TOP

¥»©«³Ì«á¥Ñ samwang ©ó 2022-5-29 11:00 ½s¿è
¦^´_  samwang


    ·PÁ§A¤£¹½¨ä·Ðªº´ú¸Õ!!
¦ý¨S¿ìªk¦¨¥\¤Þ¤J...¤Ï¦Ó­ì¦³ªº"¸gºÞªí®æ"¤º®e¤]³Q²MªÅ¤F ...
waitto04 µoªí©ó 2022-5-29 10:40


¤Ï¦Ó­ì¦³ªº"¸gºÞªí®æ"¤º®e¤]³Q²MªÅ¤F
>> ¹ï¤£°_¡A²M°£Á`ªí¸ê®Æ[b5:f58] = ""¡A«e­±¤Ö¤F. ½Ð¦Û¦æ¥[¤J¡A§Ú¤]§âµ{¦¡ªþ¤W»¡©ú¡A½Ð¦A¦Û¤v½T»{¤@¤U¡AÁÂÁÂ

Sub test()
Dim Arr, xD, T$, i&, j%
Set xD = CreateObject("Scripting.Dictionary")
For Each sh In Sheets
    If InStr(sh.Name, "±M®×") Then '¤u§@¦WºÙ¦³±M®×
        With sh
            Arr = .[a1].CurrentRegion '¸ê®Æ¸Ë¤J¼Æ²Õ
            For i = 5 To UBound(Arr)
                If Arr(i, 3) = "" Then GoTo 90 '¨S¼Æ¾ÚÂ÷¶}
                T = sh.Name & "|" & Arr(i, 1)  '±ø¥ó:¤u§@ªí¦WºÙ+¶µ¥Ø
                xD(T) = Arr(i, 3)              '¼Æ¾Ú¸Ë¤J¦r¨å
90:         Next
        End With
    End If
Next
With Sheets(1)
   .[b5:f58] = "" '²M°£­ì¦³¼Æ¾Ú¸ê®Æ¡A«e­±­ì¨Óº|±¼  .   ¡A½Ð¦Û¦æ­×§ï
    Arr = .[a1].CurrentRegion  '¸ê®Æ¸Ë¤J¼Æ²Õ
    For i = 5 To UBound(Arr): For j = 2 To UBound(Arr, 2)
        T = Arr(4, j) & "|" & Arr(i, 1) '±ø¥ó:¤u§@ªí¦WºÙ+¶µ¥Ø
        Arr(i, j) = xD(T) '¶×¥X¦r¨å¼Æ¾Ú
    Next: Next
    .[a1].Resize(UBound(Arr), UBound(Arr, 2)) = Arr '¼Æ¾Ú¦^¶ñ¨ìexcel
End With
End Sub

TOP

¦^´_ 9# samwang


  ¦³ÂI·Q­ú!
¬O¦]¬°ª©¥»¤£¦PªºÃö«Y©Ò¥H¦³©Ò®t§O??
¦]¬°¯uªº±a¤£¥X¨Ó...

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD