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월

은행주 - 배당주 투자 일기, 2022.07.04(월)

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