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

¨Ì¹ï¸Ü®Ø­n¨D¼g¤J¸ê®Æ

¨Ì¹ï¸Ü®Ø­n¨D¼g¤J¸ê®Æ

¦U¦ì«e½ú§A­Ì¦n!
         «e½ú!!°ÝÃD¦pªþÀÉ»¡©ú
           ½Ðª¾¹Dªº«e½ú,¤£§[½ç±ÐÁÂÁ¦A¤T!!

Leov52.rar (16.6 KB)

Sub ¸ê®Æ() 'K2
  Dim iRows%, iNum%, iI%
  Dim vData, vTimes
  
  iRows = [A65535].End(xlUp).Row
  iNum = 3
  
  vData = Application.InputBox("¿é¤J¼Æ¦r", "½Ð¿é¤J¸ê®Æ", Range("AA1"), Type:=2)
  Do Until vData = 0 Or vData = "" Or iNum > iRows
    Range("AA1") = vData
    vTimes = Application.InputBox("¿é¤J¦¸¼Æ", "½Ð¿é¤J¼g¤J¸ê®Æªº¦¸¼Æ", Type:=2)
    If vTimes = 0 Or vTimes = "" Then
      Exit Sub
    Else
      For iI = 0 To vTimes - 1
        Cells(iNum + iI, 2) = vData
      Next
      iNum = iNum + iI
    End If
    If iNum <= iRows Then
      vData = Application.InputBox("¿é¤J¼Æ¦r", "½Ð¿é¤J¸ê®Æ", Range("AA1"), Type:=2)
    End If
  Loop
End Sub

TOP

¸Õ¸Õ¬Ý¬O¤£¬O§A­nªº~


    Leov52R1.rar (14.83 KB)

TOP

¦^´_ 1# myleoyes
¬O³o¼Ë¶Ü
   
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2.       If Target(1).Address = "$L$2" Then Ex
  3. End Sub
  4. Private Sub Ex()
  5.     Dim Rng(1 To 2) As Range, A
  6.     Set Rng(1) = Cells(Rows.Count, "A").End(xlUp)
  7.     Set Rng(2) = Cells(Rows.Count, "L")
  8.     Do While Rng(1).Row <> Rng(2).End(xlUp).Row
  9.         A = Application.InputBox("½ü¤J²Ä" & Rng(2).End(xlUp).Row - 1 & "­Ó¼Æ¦r", Type:=1)
  10.         If A = False Then Exit Do
  11.         Rng(2).End(xlUp).Offset(1) = A
  12.     Loop

  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE
GBKEE«e½ú§A¦n!
cw3076«e½ú§A¦n!
     ¡@ ¨}®v!»Pcw3076 «e½úÁÂÁÂ!!¨â¦ìµ{¦¡¦³»~ÁÂÁ¦A¤T!!
luhpro«e½ú§A¦n!
        «e½ú!§Aªºµ{¦¡¬O¹ïªº¦ý¬O¸ê®Æ«o
        ¼g¤J¦bBÄæ¦Ó«DLÄæ©O?¤p§Ì¹ê¦bµL¯à¤O
        ­×§ï½Ð¦A¨¯­WÅo!ÁÂÁ¦A¤T!!

TOP

  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2. Dim ar()
  3. If Target.Address <> "$L$2" Then Exit Sub
  4. x = InputBox("¿é¤J¼Æ¦r", , [AA1])
  5. y = InputBox("¿é¤J¦¸¼Æ", , 3)
  6. Do Until x = "" Or y = ""
  7. For i = 1 To y
  8.   ReDim Preserve ar(s)
  9.   ar(s) = x
  10.   s = s + 1
  11. Next
  12. x = InputBox("¿é¤J¼Æ¦r", , 123)
  13. y = InputBox("¿é¤J¦¸¼Æ", , 3)
  14. Loop
  15. Range([L3], Cells(Rows.Count, 12).End(xlUp)) = ""
  16. If s > 0 Then [L3].Resize(s, 1) = Application.Transpose(ar)
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh
hsieh«e½ú§A¦n!
       °¸¹³«e½ú!ÁÂÁÂ!!µ{¦¡Áö¦n¥Î
       ¦ý«oµLªk±oª¾¸ê®Æ¤w¸g¼g¨ì²Ä´X¦C
       ©Ò¥HµLªk°±¤î¿é¤J¶Ë¸£µ¬
       °ÝÃD¦pªþÀÉ»¡©ú
       ½Ð¦A³Â·Ð­×§ï¨¯­WÅo!ÁÂÁ¦A¤T!!

Leov52-1.rar (17.87 KB)

TOP

¦^´_ 7# myleoyes
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2. Dim ar()
  3. If Target.Address <> "$L$2" Then Exit Sub
  4. x = InputBox("¿é¤J¼Æ¦r", , [AA1])
  5. y = InputBox("¿é¤J¦¸¼Æ", , 3)
  6. Do Until x = "" Or y = ""
  7. For i = 1 To y
  8.   ReDim Preserve ar(s)
  9.   ar(s) = x
  10.   If s = Application.Max([A:A]) Then GoTo 10
  11.   s = s + 1
  12. Next
  13. x = InputBox("¿é¤J¼Æ¦r", , 123)
  14. y = InputBox("¿é¤J¦¸¼Æ", , 3)
  15. Loop
  16. 10
  17. Range([L3], Cells(Rows.Count, 1).End(xlUp).Offset(, 11)) = ""
  18. If s > 0 Then [L3].Resize(s, 1) = Application.Transpose(ar)
  19. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh
hsieh«e½ú§A¦n!
       °¸¹³«e½ú!ÁÂÁÂ!!¯u¬O¤Ó´ÎÅo!
       ¨¯­WÅo!ÁÂÁ¦A¤T!!
       ¶¶«K´£¨ìluhpro«e½úªºµ{¦¡
       ­ì¨ÓCells(iNum + iI, 2) = vData¬O¸ê®Æ¼g¤J¦bBÄæ
       §ï¦¨Cells(iNum + iI, 12) = vData¬O¸ê®Æ¼g¤J¦bLÄæ
       ¦­¤W»°¤W¯Z¨S¦³¥´¶}ÁôÂÃÄæ©Ò¥Hµo²{µL®Ä
       ¤£¹Lµ{¦¡ÁÙ¬O¤Ö¤Fªº¶W¥XA¦C¸ê®ÆµLªk§R°£

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2011-5-26 23:08 ½s¿è

¦^´_ 9# myleoyes
¶â...¬Oªº.
¦]¬°§Ú²ßºD§âµ{¦¡µ²ªG²£¥Í¦b½d¨Òµ²ªGªº®ÇÃä¥H«K¤ñ¸û¬O§_¦³¿ù»~¥X²{,
¨ìµoªíªº®É­Ô«o§Ñ¤F§â¥¦§ï¹L¨Ó¤F,
³o¬O§Úªº²¨©¿³y¦¨§Aªº¤£«K·q½Ð¨£½Ì.

"¤£¹Lµ{¦¡ÁÙ¬O¤Ö¤Fªº¶W¥XA¦C¸ê®ÆµLªk§R°£" ³o¥y§Ú¬Ýªº¤£¬O«ÜÀ´,
§A½d¨ÒÀɤ¤»¡¨ì "ª½°O¿ý¨ìAÄ檺³Ì«á¤@¼Æ¾Ú¬°¤î",
¨º¤£´NÀ³¸Ó¬O´N¥H A Ä檺¸ê®Æ¼Æ¶q¬°²£¥Í¼Æ­Èªº¨Ì¾Ú¶Ü?

¦pªG¬O§Æ±æ²£¥Í³Ì«á¤@µ§¸ê®Æ«á©³¤U³£¤@«ß²MªÅªº¸Ü,
¥i¥H¦b Loop ©³¤U¼W¥[¤@¦æ :
  Range(Cells(iRows + 1, 12), Cells(65536, 12)) = ""
§Y¥i.
(¤W­±ªº¨º¦æ¤]¥i¶¶«KÅܤ@¤U : iRows = [A65536].End(xlUp).Row)

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD