LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default I'm stuck

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, please, I'm stuck Harvest Excel Discussion (Misc queries) 3 August 19th 06 03:28 AM
Still stuck Adrian Excel Programming 5 May 21st 04 03:56 PM
stuck please help derekc[_8_] Excel Programming 2 May 19th 04 06:08 AM
Stuck! John[_78_] Excel Programming 7 February 25th 04 01:52 PM
I am new to VBA and am stuck djsmithuk123 Excel Programming 2 December 12th 03 02:13 PM


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"