Use this as there is no need for a loop, also it is important to leave the Application.Trim() in:
Sub test()
Dim r As Variant, s As String
s = [a1].Value
r = Split(Application.Trim(s), "|")
[b1].Resize(UBound(r, 1) + 1) = Application.Transpose(r)
End Sub