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

¼Æ¦C¤¤¶¡¬y¤ô¸¹¦p¦ó»¼¼W?

¼Æ¦C¤¤¶¡¬y¤ô¸¹¦p¦ó»¼¼W?

dear ¦U¦ì«e½ú,
¤wª¦¤å¨S¬d¨ì¦³Ãþ¦ü¨ç¼Æ©Î¤èªk¥i¦³®Ä¸Ñ¨M
R21241031130121||P123-000-12345A||Q6000||D2117||LF210305032S2
R21241031130122||P123-000-12345A||Q6000||D2117||LF210305032S2
¥H¤W ¼Æ¦C ¬õ¦â³¡¤À ¥i§_¦³¨ç¼Æ©Î¤èªk¥i¥HÅý¥LÄ~Äò»¼¼W 0121 ¡÷0122¡÷0123¡÷0124 ...(¨Ì¦¹»¼¼W¤U¥h)
³Â·Ð¦U¦ì«e½ú¤F¡AÁÂÁÂ!!

="R2124103113"&TEXT(120+ROW(A1),"0000")&"||P123-000-12345A||Q6000||D2117||LF210305032S2"

¤U©Ô

TOP

·PÁ¤j¤j¨ó§UÀ°¦£ ­ì¥ý¬O·Q»¡¥Îmid¨ç¼ÆÂ^¨ú¥X¨Ó¦A¤â°Ê¥h¤U©Ô¡AÁÂÁÂ🙏

TOP

¦^´_ 1# killer77107

¤]¥i¥H¦bA1¥ý¿é¤J R21241031130121||P123-000-12345A||Q6000||D2117||LF210305032S2
A2¤½¦¡¦p¤U
=SUBSTITUTE(A1,MID(A1,12,4),TEXT(MID(A1,12,4)+1,"0000"))
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

ÁÂÁ¤W­±´X¦ì¤j¤j¼ö¤ß¨ó§U,·P¿E¤£ºÉ
Åý§Ú¤ÆÁc¬°Â²...Åý§Úµoı§Ú¤@ª½¬O¥Î³Ì¤¾ªøªº¤è¦¡¥h³B²z..

TOP

¦^´_ 4# ML089


­Y«e«á ¦³¦h²Õ0121, ³£·|³Q¨ú¥N, ÁÙ¬O¥ÎREPLACE¸û§´·í~~

TOP

¦^´_ 7# ­ã´£³¡ªL

REPLACE ©T©w¦ì¸m¸m´«¡A½T¹ê¤ñ SUBSTITUTE ¦w¥þ¦h¤F

3Q
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-12-1 16:38 ½s¿è

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦WºÙ,¾Ç²ß¤è®×¦p¤U

°õ¦æ¿é¤Jµ¡:


°õ¦æµ²ªG»P¦WºÙ°Ñ·Ó:



Option Explicit
Sub TEST()
Dim Brr, A, i&, N&, V%, T$, Ts$, Te$, Tv$
'¡ô«Å§iÅܼÆ
A = InputBox("", "½Ð¿é¤J»Ý¨D¦C¼Æ", 10): V = Val(A)
'¡ô¥OAÅܼƬO¿é¤Jµ¡¦^¶Ç­È,¥OVÅܼƬOAÅܼÆÂà¤Æªº¼Æ­È
If StrPtr(A) = 0 Or V = 0 Then Exit Sub
'¡ô¦pªG¿é¤Jµ¡®×¨ú®ø©Î¨S¦³¿é¤J.¿é¤J«D¼Æ­È¦r¦ê´Nµ²§ôµ{¦¡°õ¦æ
[A65536].End(xlUp).Name = "AÄæ³Ì«á¦³¤º®eÀx¦s®æ"
'¡ô¥O«ü©wªºÀx¦s®æ½d³ò¥H "AÄæ³Ì«á¦³¤º®eÀx¦s®æ"¯Ç¤J¦WºÙ¸Ì
T = Range("AÄæ³Ì«á¦³¤º®eÀx¦s®æ")
'¡ôTÅܼƬO ¦WºÙ°Ñ·ÓÀx¦s®æ¦r¦ê­È
Tv = Right(Split(T & "|", "|")(0), 4)
'¡ô¥OTvÅܼƬO TÅܼƥH "|"¤À³Î¦¨ªº¤@ºû°}¦C0¯Á¤Þ¸¹°}¦C­È¨ú¥k°¼4¦r¤¸¦r¦ê
Ts = Mid(T, 1, InStr(T, Tv & "|") - 1)
'¡ô¥OTsÅܼƬOTÅܼƦb¸Ó4¦r¬y¤ô¸¹«eªº¦r¦ê
Te = Mid(T, InStr(T, "|"))
'¡ô¥OTsÅܼƬOTÅܼƦb¸Ó4¦r¬y¤ô¸¹«e«áªº¦r¦ê
ReDim Brr(1 To V, 0)
'¡ô«Å§iBrr°}¦C­È¬°ªÅ°}¦C
For i = 1 To V
'¡ô³]¶¶°j°é±N©Ò»Ýªº¬y¤ô¸¹¦r¦ê¼g¤JBrr°}¦C¸Ì
   N = N + 1
   Brr(i, 0) = Ts & Format(Val(Tv) + N, "0000") & Te
Next
Range("AÄæ³Ì«á¦³¤º®eÀx¦s®æ")(2).Resize(N) = Brr
'¡ô¥O°}¦C­È¼g¤JÀx¦s®æ¤¤
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¬y¤ô¸¹ ³Ì«á²Å¸¹«e¼Æ¦r(¿é¤J½s¸¹12084) googleºô§}:https://hcm19522.blogspot.com/
google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

        ÀR«ä¦Û¦b : ¡i¦æµ½­n¤Î®É¡j¦æµ½­n¤Î®É¡A¥\¼w­n«ùÄò¡C¦p¿N¶}¤ô¤@¯ë¡A¥¼¿N¶}¤§«e¤d¸U¤£­n°±º¶¤õ­Ô¡A§_«h­«¨Ó´N¤Ó¶O¨Æ¤F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD