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

§Ç¸¹¤Ó±`µLªk²Ö¥[¦p¹Ï

§Ç¸¹¤Ó±`µLªk²Ö¥[¦p¹Ï

¤pªZ

¦^´_ 1# show5217
  1. Private Sub CommandButton1_Click()
  2. ReDim ar(1 To TextBox1)
  3. mystr = Split([A1], "-")(0) & "-"
  4. For i = 1 To TextBox1.Value
  5.   ar(i) = mystr & Replace([A1], mystr, "") + i - 1
  6. Next
  7. [A1].Resize(TextBox1, 1) = Application.Transpose(ar)
  8. End Sub

  9. Private Sub CommandButton2_Click()
  10. Range([A2], [A2].End(xlDown)).ClearContents
  11. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


   »~·|§Úªº·N«ä¤F  ÁÂÁ ¤w¥Î³o­Ó¤èªk¸Ñ¨M
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Or Cells(1, 1) = "" Then Exit Sub
If IsNumeric(Cells(1, 1)) Then
For i = 2 To TextBox1.Value
    Cells(i, 1) = Cells(i - 1, 1) + 1
Next
Else
Set reg = CreateObject("vbscript.regexp")
With reg
    .Global = True
    .Pattern = "[0-9]"
For Each Match In .Execute(Cells(1, 1))
    numb = numb & Match
Next
End With
eng = Left(Cells(1, 1), Len(Cells(1, 1)) - Len(numb))
For i = 2 To TextBox1.Value
    Cells(i, 1) = eng & (numb + i - 1)
Next
'[a1].AutoFill Destination:=Range("a1:a" & TextBox1.Value + 1), Type:=xlfillserise
End If
End Sub

Private Sub CommandButton2_Click()
Columns(1).ClearContents
End Sub
¤pªZ

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD