D
Dan
I am using John Walkenbach function to extract the Nth element from a string:
this is working fine in most cases bit not when one of my Separator is
char(10) ---> the end of a line, any idea?
Many thanks,
Dan
Function EXTRACTELEMENT(Txt, n, Separator) As String
' Returns the nth element of a text string, where the
' elements are separated by a specified separator character
Dim AllElements As Variant
AllElements = Split(Txt, Separator)
EXTRACTELEMENT = AllElements(n - 1)
End Function
this is working fine in most cases bit not when one of my Separator is
char(10) ---> the end of a line, any idea?
Many thanks,
Dan
Function EXTRACTELEMENT(Txt, n, Separator) As String
' Returns the nth element of a text string, where the
' elements are separated by a specified separator character
Dim AllElements As Variant
AllElements = Split(Txt, Separator)
EXTRACTELEMENT = AllElements(n - 1)
End Function