Function dirk(txt As String) As String
Dim i, a, temp
a = Split(txt, delim)
For i = UBound(a) To LBound(a) Step -1
temp = temp & Trim(a(i)) & " " & delim & " "
Next
dirk = Left(temp, Len(temp) - 2)
End Function
Public Function foobar(ByRef strIn As String) As String
Dim tmpArr() As String
tmpArr = Split(Range("a1").Value)
Call Reverse(tmpArr)
foobar = Join(tmpArr, " ")
End Function
Public Sub Reverse(ByRef lParams() As String)
Dim i As Long, tmp As String
For i = 0 To UBound(lParams) / 2 - 1
tmp = lParams(i)
lParams(i) = lParams(UBound(lParams) - i)
lParams(UBound(lParams) - i) = tmp
Next i
End Sub
Public Function foobar(ByRef strIn As String) As String
Dim tmpArr() As String
tmpArr = Split(strIn)
Call Reverse(tmpArr)
foobar = Join(tmpArr, " ")
End Function
Public Sub Reverse(ByRef lParams() As String)
Dim i As Long, tmp As String
For i = 0 To UBound(lParams) / 2 - 1
tmp = lParams(i)
lParams(i) = lParams(UBound(lParams) - i)
lParams(UBound(lParams) - i) = tmp
Next i
End Sub
Book3 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | test this | this test | ||||
2 | 4189 > 3743 > 2040 > 949 > 195 > 5 | 5 > 195 > 949 > 2040 > 3743 > 4189 | ||||
3 | 22 > 99999 > 1 > 43 > 783 > 44 | 44 > 783 > 43 > 1 > 99999 > 22 | ||||
Sheet1 |