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

[µo°Ý] ¨ç¼Æ°}¦C¸ê®Æ¦p¦ó¥H¥HVBA°õ¦æ

[µo°Ý] ¨ç¼Æ°}¦C¸ê®Æ¦p¦ó¥H¥HVBA°õ¦æ

¦U¦ì¦Ñ®v¦n:

ªþ¥óEXCEL¥H°}¦C¤è¦¡±a¤J¸ê®Æ¡A¸ê®Æ¤éº¥Ãe¤j¡A³B²z°_¨Ó©µ¿ð¤Î¯Ó®É¡C
¥i¥H¨ó§U¥HVBAªºµ{¦¡°õ¦æ¹ê²{¶Ü?ÁÂÁÂ

Isp-test.zip (725.75 KB)

¦^´_ 1# keny1021

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

Sub test()
Dim Arr, Brr(), T$, i&, j%
T = Sheets(2).Range("e4")
Arr = Sheets(1).Range("a1").CurrentRegion
ReDim Brr(1 To UBound(Arr), 1 To 11)
For i = 2 To UBound(Arr)
    If Arr(i, 1) = T Then
        n = n + 1: For j = 2 To 7: Brr(n, j - 1) = Arr(i, j): Next
        For j = 8 To 11
        Brr(n, j) = Application.RandBetween(Brr(n, 6) * 100, Brr(n, 5) * 100) * 0.01
        Next
    End If
Next
If n > 0 Then
    With Sheets(2)
        .[b6].CurrentRegion.Offset(1) = ""
        .[b7].Resize(n, 11) = Brr
    End With
End If
End Sub

TOP

¦^´_ 2# samwang

Samwang ¤j¤j ·PÁ±z:

¥i¥H¦A³Â·Ð±z¡A·í§Ú®æ¦¡µy§@½Õ¾ã«á¡Aµo²{A5:L5Àx¦s®æ­Y¦³«Ø¥ß­È«á¡A°õ¦æ«á¡A¾ã­ÓB6:L6ªº­È·|³Q²M°£±¼¡C
³Â·Ð¦A¬Ý¤@¤U«ç¼Ë°µ½Õ¾ã.ÁÂÁÂ

Isp-test-2.zip (725.34 KB)

TOP

¦^´_  samwang

Samwang ¤j¤j ·PÁ±z:

¥i¥H¦A³Â·Ð±z¡A·í§Ú®æ¦¡µy§@½Õ¾ã«á¡Aµo²{A55Àx¦s®æ­Y¦³«Ø¥ß­È ...
keny1021 µoªí©ó 2022-8-4 16:12


¦]¬°§A­ì¨Óªº¤£³sÄò¡A©Ò¥H±q²Ä6¦C©¹¤U1¦C«á²M°£.[b6].CurrentRegion.Offset(1) = ""
²{¦b¬O³sÄò¸ê®Æ©Ò¥H§ï¬°±q²Ä1¦C©¹¤U6¥H«á²M°£
.[b1].CurrentRegion.Offset(6) = ""

TOP

¦^´_ 4# samwang

Samwang ¤j¤j ±z¦n:´ú¸Õµ²ªGOK¡C·PÁ«üÂI

¤U¦C»yªk¬O¤§«e®M¥Î¦b¨ç¼Æªº°}¦C¶]§å¦¸°j°é°õ¦æ¸ê®Æ¥Í¦¨«á¦C¦L(PDFµêÀÀ¦Lªí¾÷)¡A
¦p¦óµ²¦X±z´£¨ÑªºVBA¶i¦æ¸ê®Æ°j°é¦C¦L¡A¦pªþ¥ó"Isp-test-3 ¹w´Áµ²ªG"

Private Sub CommandButton1_Click()
Set sh3 = Worksheets("List")
Set sh2 = Worksheets("Isp")
For AA = 1 To Application.CountA(sh3.Range("a2:a500"))

sh2.[E2] = sh3.Cells(AA + 1, 3)
sh2.[E3] = sh3.Cells(AA + 1, 5)
sh2.[E4] = sh3.Cells(AA + 1, 14)
sh2.[k2] = sh3.Cells(AA + 1, 11)
sh2.[k3] = sh3.Cells(AA + 1, 9)
sh2.[K4] = sh3.Cells(AA + 1, 7)
sh2.PrintOut
Next
  

End Sub

Isp-test-3.zip (727.62 KB)

Isp-test-3.zip (751.03 KB)

TOP

¦^´_  samwang

Samwang ¤j¤j ±z¦n:´ú¸Õµ²ªGOK¡C·PÁ«üÂI

¤U¦C»yªk¬O¤§«e®M¥Î¦b¨ç¼Æªº°}¦C¶]§å¦¸°j°é ...
keny1021 µoªí©ó 2022-8-5 10:57


¤£¦n·N«ä¡A¤£¤Ó¤F¸Ñ»Ý¨D¡A²{¦bµ{¦¡½X¤£¬O¥i¥H²£¥X¤F¶Ü? ½Ð¦A¸Ô²Ó»¡©ú¤@¤U¡AÁÂÁÂ

TOP

RE: ¨ç¼Æ°}¦C¸ê®Æ¦p¦ó¥H¥HVBA°õ¦æ

¥»©«³Ì«á¥Ñ keny1021 ©ó 2022-8-5 15:53 ½s¿è

¦^´_ 6# samwang

Samwang ¤j¤j ±z¦n:
¥D­n§Ú¥[¤J¤§«eªº»yªk®M¥Î«á¡A°õ¦æ«á·|²£¥ÍªÅ¦æ¡A¦p¤U­±¹Ï¤@©Ò¥Ü:


¤U­±¹Ï¤G¬°³Ì²×°õ¦æªºµ²ªG:




³Â·Ð¬Ý¤@¤U»yªk¦p¦ó¹ê²{¡A¦A¦¸·PÁÂ

Isp-test-3.zip (727.62 KB)

TOP

¦^´_  samwang

Samwang ¤j¤j ±z¦n:
¥D­n§Ú¥[¤J¤§«eªº»yªk®M¥Î«á¡A°õ¦æ«á·|²£¥ÍªÅ¦æ¡A¦p¤U­±¹Ï¤@©Ò¥Ü:
...
keny1021 µoªí©ó 2022-8-5 15:49

½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
If n > 0 Then
    With Sheets(2)
        .[b1].CurrentRegion.Offset(6) = "" '±q²Ä¤@¦C©¹¤U¦Ü²Ä6¦C«á¶}©l§R°£
        .[b7].Resize(n, 11) = Brr
    End With
    n = 0
End If
sh2.PrintOut
Next

TOP

¦^´_ 8# samwang


:P ¤w¸Ñ¨M¤F.¤Ó·PÁ±z¤F

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD