¦p¦óºI¨ú¬Y¤@¦r²´(K2)«_«á¤§«áªº10Ó¦r
- ©«¤l
- 334
- ¥DÃD
- 139
- ºëµØ
- 0
- ¿n¤À
- 621
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWSXP
- ³nÅ骩¥»
- OFFICE2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥x¥_¿¤
- µù¥U®É¶¡
- 2010-8-5
- ³Ì«áµn¿ý
- 2022-11-3
|
¦A½Ð±Ð,°w¹ï³oÃD,¦AÅܤÆÃD¥Ø,¦p¤U:
°ÝÃD:
¦p¦óºI¨úk2«_¸¹¥H«áªº¦r¦ê¡A¦@10Ó¦r(¤£§t«_¸¹)¡Aµª®×¦bBÄæ
k2®æ¦¡¡A^¤å¦rk¦³¤j¼g©Î¤p¼g¡F¥t¡Ak2«á±«_¸¹¡A¦³ªº¥þ§Î¦³ªº¥b§Î
°£¤F¥H¤Wªº±¡§Î¥~¡A¦³¥i¯à¦b2«á±¦³¤@Ó¡y½X¡z¦r(¨Ò¦pA5~A8)
¥t¥~¡A¼W¥[¤F¡AÀx¦s®æ¤º¦³(»²¤G:©Î»²¤G¡G)³oÓ¦r²´¡A¤]n«_¸¹«á±10Ó¦r(¨Ò¦pA10~A12) |
|
joyce
|
|
|
|
|
- ©«¤l
- 334
- ¥DÃD
- 139
- ºëµØ
- 0
- ¿n¤À
- 621
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWSXP
- ³nÅ骩¥»
- OFFICE2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥x¥_¿¤
- µù¥U®É¶¡
- 2010-8-5
- ³Ì«áµn¿ý
- 2022-11-3
|
|
joyce
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
¦^´_ 11# leiru
=MID(A2,FIND(":",ASC(A2),-LOOKUP(,-SEARCH({"K2","»²¤G"},A2)))+1,10) |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
Y¥u¦³¤@Ó ":" ©Î "¡G"
=MID(A2,SEARCH(":",ASC(A2))+1,10) |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|
- ©«¤l
- 334
- ¥DÃD
- 139
- ºëµØ
- 0
- ¿n¤À
- 621
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWSXP
- ³nÅ骩¥»
- OFFICE2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥x¥_¿¤
- µù¥U®É¶¡
- 2010-8-5
- ³Ì«áµn¿ý
- 2022-11-3
|
¦^´_ 14# ML089
ÁÂÁ±z¦^ÂÐ,Àx¦s®æ¤º¦³¦hÓ«_¸¹ |
|
joyce
|
|
|
|
|
- ©«¤l
- 175
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 207
- ÂI¦W
- 303
- §@·~¨t²Î
- WIN 10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-6-30
- ³Ì«áµn¿ý
- 2024-12-23
|
Y¨Ï¥Îã¤jªº¤è¦¡¡A±z«á±{3,4}ªº°}¦Cn»P·s¼W±ø¥ó"»²¤G:"«áªºÓ¼Æ¬ÛºÙ¤~·|¥¿½T¡C¦p¤U:
קï«e=MID(A2,-LOOKUP(,-SEARCH({"K2:","K2½X:","»²¤G:"},ASC(A2))-{3,4}),10)
קï«á=MID(A2,-LOOKUP(,-SEARCH({"K2:","K2½X:","»²¤G:"},ASC(A2))-{3,4,3}),10) |
|
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¦^´_ 1# leiru
ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾ÇÂǦ¹©«²ß±o¦h¼Ëª¾ÃÑ»P¸gÅç,¥H¤U¤ß±oµù¸Ñ½Ð°Ñ¦Ò
°õ¦æ«e:
°õ¦æµ²ªG:
Option Explicit
Sub TEST_20221228_1()
Dim i&, N&, A$, Arr
'¡ô«Å§iÅܼÆ:(i,N)¬Oªø¾ã¼ÆÅܼÆ,A¬O¦r¦êÅܼÆ,Arr¬O³q¥Î«¬ÅܼÆ
Arr = Range([A1], Cells(Rows.Count, 1).End(3))
'¡ô¥OArr¬O ¤Gºû°}¦C,¥H[A1]¨ìAÄ榳¤º®e³Ì«á¦CÀx¦s®æ,³o¤§¶¡Àx¦s®æÈˤJ
For i = 1 To UBound(Arr)
'¡ô³]¶¶°j°é!i±q1¨ìArr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹¼Æ
A = StrConv(Arr(i, 1), vbNarrow)
'¡ô¥OA³o¦r¦êÅܼƬOi°j°éArr°}¦CȸgStrConv() ±N¥þ§Î¦rÂର¥b§Î¦r ªº¦r¦ê
'StrConv ¨ç¦¡
'https://learn.microsoft.com/zh-tw/office/vba/language/reference/user-interface-help/strconv-function
If A Like "*:??????????*" Then
'¡ô¦pªGA¦r¦êÅܼƥ]§t ":"«_¸¹«á±¦³10Ó¥H¤W¦r¤¸ ?
Arr(i, 1) = Left(Split(A, ":")(1), 10)
'¡ô¥Oi°j°éArr°}¦CÈ´«¦¨: A¦r¦êÅܼƥH ":"¦r¤¸¤À³Î«áªº¯Á¤Þ¸¹1ªº¤@ºû°}¦CȦA¨ú¥ª°¼10¦r¤¸
If Arr(i, 1) Like "7????????H" = False Then N = N + 1
'¡ô¦pªGi°j°éArr°}¦CȤ£¬O«e7 «áH ¥]§¨ªº10Ó¦r¤¸,´N¥ON³oªø¾ã¼ÆÅܼƲ֥[1
Else
Arr(i, 1) = ""
'¡ô¥Oi°j°éArr°}¦CȬO ªÅ¦r¤¸
End If
Next
[C1].Resize(UBound(Arr), 1) = Arr
'¡ô¥O[C1] ÂX®i¦V¤UArr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹¼Æ¦C, ¦V¥k¤£ÂX®i, ³o½d³òÀx¦s®æÈ¥HArr°}¦Cȱa¤J
MsgBox N & " Óµ²ªGºÃ¦ü³W«h²§±`!"
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2022-12-28 08:56 ½s¿è
¦^´_ 7# leiru
ÁÂÁ«e½ú
¥H¤UÅܧó±ø¥ó°õ¦æµ²ªG»P¤ß±oµù¸Ñ,½Ð°Ñ¦Ò
°õ¦æ«e:
°õ¦æµ²ªG:
Option Explicit
Sub TEST_20221228_2()
Dim i&, N&, A$, Arr, Brr, j
'¡ô«Å§iÅܼÆ:(i,N)¬Oªø¾ã¼ÆÅܼÆ,A¬O¦r¦êÅܼÆ,(Arr,Brr,j)¬O³q¥Î«¬ÅܼÆ
Arr = Range([A1], Cells(Rows.Count, 1).End(3))
'¡ô¥OArr¬O ¤Gºû°}¦C,¥H[A1]¨ìAÄ榳¤º®e³Ì«á¦CÀx¦s®æ,³o¤§¶¡Àx¦s®æÈˤJ
For i = 1 To UBound(Arr)
'¡ô³]¶¶°j°é!i±q1¨ìArr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹¼Æ
A = StrConv(Arr(i, 1), vbNarrow)
'¡ô¥OA³o¦r¦êÅܼƬOi°j°éArr°}¦CȸgStrConv() ±N¥þ§Î¦rÂର¥b§Î¦r ªº¦r¦ê
'StrConv ¨ç¦¡
'https://learn.microsoft.com/zh-tw/office/vba/language/reference/user-interface-help/strconv-function
If A Like "*:7????????H*" Then
'¡ô¦pªGA¦r¦êÅܼƥ]§t ":"«_¸¹«á±¦³10Ó¥H¤W¦r¤¸ ?
Brr = Split(A, ":")
'¡ô¥OBrr¬O¤@ºû°}¦C,±a¤J¥H":"¤À³ÎA¦r¦êÅܼƪº°}¦CÈ
For Each j In Brr
'¡ô³]¶¶°j°é!¥Oj¬O Brr°}¦C¸ÌªºÈ
j = Left(j, 10)
'¡ô¥Oj³o³q¥ÎÅܼƬO¦Û¨ ¨ú«e10Ó¦rªº¦r¦ê
If j Like "7????????H" Then Arr(i, 1) = j: Exit For
'¡ô¦pªGj¦r¦êÅܼƬO «e7 «áH ¥]§¨ªº10Ó¦r¤¸,´N¥Oi°j°éArr°}¦CÈ´«¦¨jÅܼÆÈ:µ²§ôj°j°é
Next
If Arr(i, 1) Like "7GA??????H" = False Then N = N + 1
'¡ô¦pªGi°j°éArr°}¦CȤ£¬O«e7GA «áH ¥]§¨ªº10Ó¦r¤¸,´N¥ON³oªø¾ã¼ÆÅܼƲ֥[1
Else
Arr(i, 1) = ""
'¡ô¥Oi°j°éArr°}¦CȬO ªÅ¦r¤¸
End If
Next
[C1].Resize(UBound(Arr), 1) = Arr
'¡ô¥O[C1] ÂX®i¦V¤UArr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹¼Æ¦C, ¦V¥k¤£ÂX®i, ³o½d³òÀx¦s®æÈ¥HArr°}¦Cȱa¤J
MsgBox N & " Óµ²ªGºÃ¦ü³W«h²§±`!"
Set Arr = Nothing
End Sub
#12¼Ó½d¨Ò:
[E1].Resize(UBound(Arr), 1) = Arr:
|
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|