Excel VBA, Split()

Option Base 1
Sub test()

    Dim fruit As Variant
    
    fruit = Split("apple,banana,cranberry,grape,orange", ",")
    MsgBox fruit(0)    'apple
    MsgBox fruit(1)    'banana
    MsgBox fruit(2)    'cranberry
    MsgBox fruit(3)    'grape
    MsgBox fruit(4)    'orange

' Regardless of Option Base 1, it starts 0
' Split - Variant

End Sub

댓글

이 블로그의 인기 게시물

<배당주 투자> 지주사, '22년 8월

<배당주 투자> ETF, ETN, '22년 9월

<배당주 투자> 분기배당주 '22년 10월