The split function isn't designed to remove characters from a string - so no
surprise it would be a disappointment. The Replace function does that. If
you want to put the data delimited in an array, a very popular requirement,
then the split function works quite well and is offered as a solution to a
wide variety of problems posted in this group.
As Dana pointed out, your RemoveDelimiters function just reinvents the
wheel. Replace would work much faster.
Am I missing something in the greatness of the SPLIT FUNCTION?
Probably an understanding of how to use it.
here is some sample code where using split came in very handy:
Sub FixData()
Dim rng As Range, cell As Range
Dim sStr As String, s As String
Dim v As Variant, i As Long
Set rng = Range(Cells(1, 1), Cells(1, 1).End(xlDown))
For Each cell In rng
sStr = Replace(cell.Value, "<", "|(")
sStr = Replace(sStr, ">", ")|")
If Left(sStr, 1) = "|" Then _
sStr = Right(sStr, Len(sStr) - 1)
If Right(sStr, 1) = "|" Then _
sStr = Left(sStr, Len(sStr) - 1)
sStr = Replace(sStr, "||", "|")
v = Split(sStr, "|")
s = ""
For i = LBound(v) To UBound(v)
s = s & Replace(Replace(v(i), _
"(", "<"), ")", ">") & "<write:" _
& v(i) & ">"
Next i
cell.Offset(0, 1).Value = s
Next cell
End Sub