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

¥X³f³æ«Ø¥ß

¥X³f³æ«Ø¥ß

½Ð°Ý¦U¦ì¥ý¶i¡A¥Ø«e¹J¨ì¦¹°ÝÃD
§Ú¥ý¦b¸ê®Æ¿é¤J¥´§¹¸ê®Æ«á¡A±N©Ò¦³¸ê®Æ¶×¦Ü¥X³f¸ê®Æ³o°Ï¶ô
·Q¦b¥X³f¸ê®Æ¤À­¶±NAÄæ¤]±a¤J³æ¸¹
½Ð°Ý­n¦pÅý±N³æ¸¹³oÄæ¡A¥i¥H¦Û°Ê§P©wBÄæ¦ì³o¦¸·s¼W¦h¤Ö"¹Ï¸¹"¡A''±N³æ¸¹½Æ»s¦bAÄæ¦ì

test.rar (24.65 KB)

¦^´_ 1# cclo0728
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, T, R&
With Sheets("¸ê®Æ¿é¤J")
    R = .[b65536].End(3).Row
    If R < 5 Then Exit Sub
    Arr = .Range("b5:g" & R)
    T = .[F2]
End With
With Sheets("¥X³f¸ê®Æ")
    R = .[b65536].End(3).Row + 1
    .Range("b" & R).Resize(UBound(Arr), 6) = Arr
    .Range("a" & R & ":a" & R + UBound(Arr) - 1) = T
End With
End Sub

TOP

¦^´_ 2# samwang
Sub test()
Dim Arr, T, R&
With Sheets("¸ê®Æ¿é¤J")
    R = .[b65536].End(3).Row
    If R < 5 Then Exit Sub <------³o¦æªº·N«ä¬O?
    Arr = .Range("b5:g" & R)
    T = .[F2]
End With
With Sheets("¥X³f¸ê®Æ")
    R = .[b65536].End(3).Row + 1
    .Range("b" & R).Resize(UBound(Arr), 6) = Arr<------³o¦æªº·N«ä¬O?
    .Range("a" & R & ":a" & R + UBound(Arr) - 1) = T<------³o¦æªº·N«ä¬O?
End With
End Sub

°²¦p§Ú§â«È¤á³æ¸¹¥Ñf2²¾¦Üb2
­n±Na2»Pb2³o¨âÄæ©ñ¨ì¥X³f¸ê®ÆabÄæ½Ð°Ý­n¦p¦ó­×§ï?

TOP

¦^´_  samwang
Sub test()
Dim Arr, T, R&
With Sheets("¸ê®Æ¿é¤J")
    R = ..End(3).Row
    If R  ...
cclo0728 µoªí©ó 2022-10-6 16:36


  If R < 5 Then Exit Sub <------³o¦æªº·N«ä¬O? >> ¦pªG¨S¸ê®Æ´NÂ÷¶}
   .Range("b" & R).Resize(UBound(Arr), 6) = Arr<------³o¦æªº·N«ä¬O? >> ¸ê®Æ¶K¨ì¥X³f¸ê®Æªº³Ì«á¤@¦C
   .Range("a" & R & ":a" & R + UBound(Arr) - 1) = T<------³o¦æªº·N«ä¬O? >> ¶K¤W³æ¸¹
°²¦p§Ú§â«È¤á³æ¸¹¥Ñf2²¾¦Üb2  >>  T = .[b2]
­n±Na2»Pb2³o¨âÄæ©ñ¨ì¥X³f¸ê®ÆabÄæ½Ð°Ý­n¦p¦ó­×§ï? >> ¤£¦n·N«ä¡A¬Ý¤£¤ÓÀ´¡A½Ðªþ¤WÀÉ®×

TOP

¦^´_ 4# samwang
­n±N¸ê®Æ¿é¤Jªºa2»Pb2Äæ¦ì¡A±a¤J¥X³f¸ê®Æªº¤À­¶
test.rar (25.61 KB)

TOP

¦^´_  samwang
­n±N¸ê®Æ¿é¤Jªºa2»Pb2Äæ¦ì¡A±a¤J¥X³f¸ê®Æªº¤À­¶
cclo0728 µoªí©ó 2022-10-7 08:10

½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, T, T2, R&
With Sheets("¸ê®Æ¿é¤J")
    R = .[b65536].End(3).Row
    If R < 5 Then Exit Sub
    Arr = .Range("b5:g" & R)
    T = .[A2]: T2 = .[B2]
End With
With Sheets("¥X³f¸ê®Æ")
    R = .[C65536].End(3).Row + 1
    .Range("C" & R).Resize(UBound(Arr), 6) = Arr
    .Range("a" & R & ":a" & R + UBound(Arr) - 1) = T
    .Range("b" & R & ":b" & R + UBound(Arr) - 1) = T2

End With
End Sub

TOP

¦^´_ 6# samwang
«D±`·PÁ¡A¥i¥H°õ¦æ
¬Q¤Ñ¦b¬Ýªº®É­Ô¥H¬°¥i¥Hª½±µa2:b2ª½±µ¥Î½d³ò½Æ»s
¤µ¤Ñª¾¹D­n¦p¦ó³B²z¤F¡AÁÂÁÂ

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2022-10-7 16:21 ½s¿è

¦^´_ 5# cclo0728


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾Ç´£¨Ñ¥t¤@ºØ¤èªk¨Ñ«e½ú°Ñ¦Ò
¤µ¤Ñ²ß±o°}¦C­Ë¤J¦r¨å»P¦Ü¦r¨å¤¤¨ú¥X°}¦C
½m²ß°}¦C»y¦r¨å

'§R°£µ²ªGªí¸ê®Æ!¦A±a¤J·s¸ê®Æ
Option Explicit
Sub test_A()
Dim Arr, T, xD, xA, xB
'¡ô«Å§iÅܼÆ

Set xD = CreateObject("Scripting.Dictionary")
'¡ô¥OxD¬O¦r¨å

Set xA = Sheets("¸ê®Æ¿é¤J")
'¡ô¥OxA¬O¤u§@ªí "¸ê®Æ¿é¤J"

Set xB = Sheets("¥X³f¸ê®Æ")
'¡ô¥OxB¬O¤u§@ªí"¥X³f¸ê®Æ"

T = xA.Cells(Rows.Count, 3).End(3).Row - 4
'¡ô¥OT¬O"¸ê®Æ¿é¤J"ªí­n±a¤J "¥X³f¸ê®Æ"ªíªº¦C¼Æ

Arr = xA.Cells(5, 2).Resize(T, 6)
'¡ô¨Ó·½ªí¸ê®Æ­Ë¤JArr°}¦C

xD(1) = Arr
'¡ôArr°}¦C­Ë¤J¦r¨å

xD(2) = xA.Cells(2, 1)
'¡ô«È¤á¦WºÙ­Ë¤J¦r¨å

xD(3) = xA.Cells(2, 2)
'¡ô³æ¸¹­Ë¤J¦r¨å

xB.UsedRange.Offset(1, 0).EntireRow.Delete
'¡ô¸ê®Æ§R°£

xB.[C2].Resize(UBound(Arr), 6) = xD(1)
'¡ô±a¥X°}¦C©ñ¤Jµ²ªGªí

xB.[A2].Resize(T, 1) = xD(2)
'¡ô±a¥X«È¤á¦WºÙ©ñ¤Jµ²ªGªí

xB.[B2].Resize(T, 1) = xD(3)
'¡ô±a¥X³æ¸¹©ñ¤Jµ²ªGªí

End Sub

TOP

¦^´_ 6# samwang

½Ð±Ð°ÝÃD§Ú¦b¥X³f¸ê®Æ¤¤221007001¦³10µ§¡A§Ú¦b¸ê®Æ¿é¤J¦A¿é¤J10¸ê®Æ¡A³æ¸¹¥i¥H§P©w¥X³f¸ê®Æ³Ì«á¤@Äæ¦ì+1¶Ü?
¨Ò¦p³æ¸¹¥i¥H¦Û°Ê·í¤Ñ¤é´Á+¬y¤ô¸¹¡A221007001
§Úªº·Qªk¬O¿é¤J©ú²Ó«á¡A¶×¦Ü¥X³f¸ê®Æ®É¦b³æ¸¹³¡¤À´N±a¤J¤é´Á¥[¬y¤ô¸¹¡A¹j¤Ñ¬y¤ô¸¹´N¦^¨ì1
³Â·Ð¦b«üÂI¡AÁÂÁÂ
test.rar (22.24 KB)

TOP

¦^´_ 8# Andy2483
«Ü¸Ô²Ó¡AÁÙªþ¤¤¤å¡A§Ú´ú¸Õ¨Ï¥Î¡A·PÁ«üÂI:)

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD