VBA ユーザー定義関数 Split(文字列,区切り値,取り出す配列番号)
'カスタム関数 Split(文字列,区切り値,取り出す配列番号) Function hSeparate(ByRef str As String, ByRef sep As String, Optional ByRef lmt As String) As Variant Dim v As Variant If lmt Then v = Split(str, sep)(lmt) Else v = Split(str, sep) End If hSeparate = v End Function