Not much detail to go on, maybe ...?
Option Explicit Sub Example() Dim s As String s = "04:06:57.450| SendIOS |XXXXXXXXXXXXXXXXXXXXX| 00000| X134| | 077| | | 07| 1| 4| | Del_Day_Ind| 3" MsgBox Extract(s, "|", 2) End Sub Function Extract(sIn As String, SepChar As String, Num As Long) As String Extract = Trim(Split(sIn, SepChar)(Num)) ' 0 based End Function