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

VBA §Ç¸¹¶W¹L12½X¼Æ¦r¦p¦ó¥H¼Æ¦C¤è¦¡©¹¤U¶ñº¡

VBA §Ç¸¹¶W¹L12½X¼Æ¦r¦p¦ó¥H¼Æ¦C¤è¦¡©¹¤U¶ñº¡

§Úªº§Ç¸¹¶W¹L12½X¼Æ¦r¦p¦ó¥H¼Æ¦C¤è¦¡©¹¤Uµ¥¥[¤@¶ñº¡
§Ç¸¹®i¶}.zip (27.15 KB)

¥»©«³Ì«á¥Ñ 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

TOP

¦^´_ 2# Andy2483


·PÁ¤j¯«
§Úª¦¤å«Ü¤[ ¨S§ä¨ì
«D±`¶}¤ß±zªºÀ°¦£
±z¯uªº¬O§Úªº¯«

TOP

¦^´_ 2# Andy2483

½Ð°Ý¤j¯«
§Úªº½X¼Æ¯à¸òA1¨Ì¼Ë¶Ü?0001¤£­nÅܦ¨1

TOP

¦^´_ 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

TOP

¦^´_ 5# Andy2483

ÁÂÁ±zªº²Ó¤ß«ü¾É
§Ú«Ü·Q¾Ç·|VBA ¥Ø«e¥¿¦b¾Ç°ò¦ ÁÂÁ±z!



¦pªG§Úªº§Ç¸¹¬O"0001"®i¶}·|ÅÜ"1"§Ú­n¦p¦óÅý¥¦¤£ÅÜ°Ê ³]¦¨¤å¦r®æ¬O¶Ü?

TOP

¦^´_ 6# aassddff736

¿ï¨úA:A
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 7# Andy2483

ÁÂÁ«ü±Ð

TOP

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD