Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't figure out what's wrong with this function. When I try to call it
from Excel it gives me the "#VALUE!" error. This function should be an implementation of the Burrows-Wheeler Transformation. I have gone through the code with a fine tooth comb, but can't find the problem myself. ### START CODE ### Public Function BWT_Encode(CodeString) As String Dim TheStrings() As String Dim Result As String Dim Length As Long Dim A As Long Length = Len(CodeString) Result = "" ' First build the string table TheStrings(1) = CodeString For A = 2 To Length TheStrings(A) = Right(TheStrings(A - 1), 1) & Left(TheStrings(A - 1), Length - 1) Next A ' Now sort the array alphabetically Call StrSort(TheStrings(), True, True) ' Now get last letter For A = 1 To Length Result = Result & Right(TheStrings(A), 1) Next A BWT_Encode = Result End Function ### END CODE ### |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help, please, I'm stuck | Excel Discussion (Misc queries) | |||
Still stuck | Excel Programming | |||
stuck please help | Excel Programming | |||
Stuck! | Excel Programming | |||
I am new to VBA and am stuck | Excel Programming |