VBA §Ç¸¹¶W¹L12½X¼Æ¦r¦p¦ó¥H¼Æ¦C¤è¦¡©¹¤U¶ñº¡
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-2-17 16:46 ½s¿è
¦^´_ 1# aassddff736
ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò
Private Sub CommandButton1_Click()
Dim T$, Q$, Brr, V&
T = Trim([A1]): V = Val(TextBox1.Value): If V = 0 Or T = "" Then Exit Sub
ReDim Brr(1 To V, 1 To 1)
Q = StrReverse(Mid(Val(StrReverse(T & "1")), 2))
T = Replace(T, Q, "")
For i = 0 To V - 1: Brr(i + 1, 1) = T & (Val(Q) + i): Next
[A1].Resize(V) = Brr
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 4# aassddff736
ÁÂÁ«e½ú¦^´_
«á¾Çקï»P¾Ç²ß¤ß±o¦p¤U,½Ð«e½ú°Ñ¦Ò
°õ¦æ«e:
°õ¦æµ²ªG:
Private Sub CommandButton1_Click()
Dim T$, Q$, Brr, V&, L%
'¡ô«Å§iÅܼÆ
T = Trim([A1]): V = Val(TextBox1.Value): If V = 0 Or T = "" Then Exit Sub
'¡ô¥OTÅܼƬO[A1]Àx¦s®æ¥h°£ÀY§À«áªº·s¦r¦ê,¥OVÅܼƬO¤å¦rµ¡¿é¤JÈÂà¤Æ¦¨ªº¼ÆÈ
'¦pªGVÅܼƬO0 ©ÎTÅܼƬOªÅ¦r¤¸,´Nµ²§ôµ{¦¡°õ¦æ
Intersect(Me.UsedRange, [A:A]).Offset(1).ClearContents
'¡ô¥O[A2]¶}©l¥H¤UªºÀx¦s®æ²M°£¤º®e
ReDim Brr(1 To V, 1 To 1)
'¡ô«Å§iBrrÅܼƬO¤GºûªÅ°}¦C
Q = Val(StrReverse(T & "1")): Q = StrReverse(Mid(Q, 2)): L = Len(Q)
'¡ô¥OQÅܼƬO T¦r¦ê³Ì«áªº³sÄò¼Æ¦r¦ê,¥OLÅܼƬOQÅܼƪº¦r¤¸¼Æ
T = Replace(T, Q, "")
'¡ô¥OTÅܼÆÅܦ¨¦Ü´«±¼QÅܼƫ᪺·s¦r¦ê
For i = 0 To V - 1: Brr(i + 1, 1) = T & Application.Text(Val(Q) + i, String(L, "0")): Next
'¡ô³]¶¶°j°é!¥OiÅܼƱq0 ¨ìVÅܼÆ-1,±N°j°é·s¦r¦ê¼g¤JBrr°}¦C¤¤
[A1].Resize(V) = Brr
'¡ô¥O±q[A1]Àx¦s®æ¶}©l¦V¤UÂX®iVÅܼÆÓÀx¦s®æ½d³ò,¥HBrr°}¦Cȼg¤J
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 6# aassddff736
¿ï¨úA:A
|
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|