0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

特定文字列の切り出しEXCELユーザー定義関数1️⃣

Posted at
Function ExtractBBB(inputString As String) As String
    Dim parts() As String
    Dim delimiterPos As Integer
    Dim beforeDelimiter As String
    
    ' 最初の空白の位置を確認
    delimiterPos = InStr(1, inputString, " ", vbTextCompare)
    
    ' 空白が存在する場合、その手前の部分を抽出
    If delimiterPos > 0 Then
        beforeDelimiter = Left(inputString, delimiterPos - 1)
    Else
        beforeDelimiter = inputString
    End If
    
    ' "." で分割して最後の部分を取得
    parts = Split(beforeDelimiter, ".")
    ExtractBBB = parts(UBound(parts))
End Function
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?