SplitValue2 is an alternative function
Option Explicit
Sub drv()
MsgBox = SplitValue2(Range("A1"))
End Sub
Function SplitValue2(ByVal myMCode As String) As Long
Dim myMCode2 As String
Dim myTextArr As Variant
myMCode2 = Trim(myMCode)
If Right(myMCode2, 1) = "+" Then myMCode2 = Left(myMCode2, Len(myMCode2) - 1)
myTextArr = Split(myMCode2, "+")
SplitValue2 = UBound(myTextArr) - LBound(myTextArr) + 1
End Function
Function SplitValue(ByVal myMCode As String) As Long
' Remove Blank Spaces
Dim myMCode2 As String
myMCode2 = Replace(myMCode, " ", "") ' if all you want is the length and seperated by +, then no need
Dim myTextArr() As String
myTextArr() = Split(myMCode2, "+")
Dim myMCodeNos As Integer
myMCodeNos = UBound(myTextArr)
ReDim myTextArr(myMCodeNos) ' <<<<< had a typo
SplitValue = myMCodeNos + 1
End Function