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

½Ð°Ý¦b¦r¦ê¤¤§ä¦r¤¸ªº¶i¶¥¥Îªk

½Ð°Ý¦b¦r¦ê¤¤§ä¦r¤¸ªº¶i¶¥¥Îªk

¦U¦ì¤j¤j
½Ð°Ý¤@¤U, §Ú¦³¤@­Ó¦b¦r¦ê¤¤·j´M¦r¤¸ªº°ÝÃD, ¦p¤U
§Úªº¦r¦ê«Üªø , ¸Ì­±¦³6­Ó _ , ¦pªG§Ú­n§ä²Ä¤­­Ó _ , ¦³¨S¦³¤ñ¸û¦nªº¤èªk©O?
§Úª¾¹D¦³InStr³o­Ó¤è¦¡¥i¥H¥Î , ¦p Instr(38, ¦r¦ê, "_")
¦ý¬O§Úªº¦r¦ê¦³®É­Ôªø«×·|ÅÜ, ¦pªG«ü©w38¦ì¸m¶}©l§ä, ¦³®É«á·|§ì¿ù
¦³¨S¦³¤°»ò¤èªk¥i¥Hª½±µ§ä¨ì¦r¦ê¤¤¤­­Ó _ ªº¦ì¸m?
·PÁÂ

¦r¦ê=TouchTest_check_20180630_104354_108F02_68HR-R_K8
MLB

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

TOP

¥»©«³Ì«á¥Ñ JasnH ©ó 2019-10-19 18:25 ½s¿è

Sub test1()
    p = 5       'The position of nth "_"
    tx = Cells(1, 1)
    For i = 1 To Len(tx)
        If Mid(tx, i, 1) = "_" Then jo = jo & " " & i
    Next i
    s = Split(Mid(jo, 2))
    Ans = s(p - 1)
    MsgBox "The position of " & p & "th ""_"" is " & Ans
End Sub

TOP

·PÁ¨â¦ì¤j¤jªº¸Ñµª, §Ú«á¨Ó§ä¤F¤@¤U¸ê®Æ
§Ú·Q¨ì¤U­±³o­Ó¤è¦¡¤]¥i¥Hºâ¥X¨Ó

Sub test()
Dim no As Byte
Dim Data As String

Data=Cells(3,32).Value   ''''' ¦r¦ê¦ì¸m
no=Cells(5,32).Value       ''''' ­n§ä²Ä´X­Ó _
Count=0
data_split = Split(Data , "_")
For i=1 To no
   Count = Count+1+Len(data_split(i-1))
Next i
MsgBox("²Ä" & no & "­Ó_ªº¦ì¸m¬O" & Count)
EndSub
MLB

TOP

Sub TEST_01()
Dim T$, TR, V%
T = "TouchTest_check_20180630_104354_108F02_68HR-R_K8"
V = 5
TR = Split(T, "_")
If V <= 0 Or UBound(TR) < V - 1 Then MsgBox "¶W¹L¨ú¦r½d³ò!!": Exit Sub
MsgBox TR(V - 1)
End Sub

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