Text function
What did you name your module?
Don't use the same name for functions/subs as the name of a module.
Try going into the VBE
hit ctrl-r (to see the project explorer)
select your project
Show all the modules
If you have one named ByteReverse (or ByteReverse2), rename it to:
Mod_ByteReverse
(or anything that is unique).
By the way, if I recall correctly, strreverse was added in xl2k. If you're
using xl97, you'll want to use Stefi's code.
(I'm sure someone will correct me if my memory is failing me on StrReverse.)
nc wrote:
Dear Dave
I tried your solution below and got this error message, "Compile error:
Expected variable or procedure, not module".
Please advise. Thanks.
"Dave Peterson" wrote:
Another one:
Option Explicit
Function ByteReverse2(InputString As String) As String
ByteReverse2 = StrReverse(InputString)
End Function
nc wrote:
Dear Stefi
What sbout if I just want to reverse a text in a cell.
Thanks.
NC
"Stefi" wrote:
Only VBA has such a function (InStrRev). You can create an UDF like this:
Public Function FindRev(StrtoSearch As String, StrSearchedFor As String) As
Long
FindRev = 0
On Error Resume Next
FindRev = InStrRev(StrtoSearch, StrSearchedFor)
End Function
Regards,
Stefi
âžncâ ezt Ã*rta:
Is there a function in Excel 2003 that is like "Search"/"Find", but start
from the right?
Thanks
--
Dave Peterson
--
Dave Peterson
|