Hello, friends!
I've wrote some function that reduces the strings by the last symbol:
Example:
<tbody>
</tbody>
But it works slow when the number of strings > 100k.
How to speed up this function?
Thank you in advance.
I've wrote some function that reduces the strings by the last symbol:
Code:
Function reducer(ByVal txt As String) As String
txt = Left(txt, InStrRev(Left(txt, Len(txt) - 1), Right(txt, 1)))
reducer = txt
End Function
Example:
A | B (function) | B (result) | |
1 | a+b+c+d+e+f+g+<strike></strike> | =reducer(A1)<strike></strike> | a+b+c+d+e+f+<strike></strike> |
2 | 11-22-33-44-55-66-77-<strike></strike> | =reducer(A2)<strike></strike> | 11-22-33-44-55-66-<strike></strike> |
3 | 11-22-33-44-55-66-<strike></strike> | =reducer(A3)<strike></strike> | 11-22-33-44-55-<strike></strike> |
4 | 11-22-33-44-55-<strike></strike> | =reducer(A4)<strike></strike> | 11-22-33-44-<strike></strike> |
5 | 11-22-33-44-<strike></strike> | =reducer(A5)<strike></strike> | 11-22-33-<strike></strike> |
6 | 11-22-33-<strike></strike> | =reducer(A6)<strike></strike> | 11-22-<strike></strike> |
7 | 11-22-<strike></strike> | =reducer(A7)<strike></strike> | 11-<strike></strike> |
8 | 11-<strike></strike> | =reducer(A8)<strike></strike> |
<tbody>
</tbody>
But it works slow when the number of strings > 100k.
How to speed up this function?
Thank you in advance.