Use my recursive GetPart() functionPublic Function GetPart(strString As String, strSep As String, intPart As Integer) As String Dim intFound As Integer Dim intNext As Integer intFound = InStr(1, strString, strSep) If intFound > 0 Then If intPart = 1 Then GetPart = Mid$(strString, 1, intFound - 1) Else 'intPart > 1 GetPart = GetPart(Mid$(strString, intFound + 1), strSep, intPart - 1) 'recursive End If Else 'intFound = 0, no occurence of seperator so return complete string GetPart = strString End If End Function
?GetPart("DE.3.2.0", ".", 2)3Enjoy!