View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
apprentice idiot apprentice idiot is offline
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

PPPPS: DAVE, IT WORKS!
I don't know why, but I decided to start afresh and do it all over again,
saving a new copy in a macro-enabled format. I followed the same steps
exactly; and, for whatever reason, I had the extreme joy of witnessing the
apparition of the words spelled out in mirror fashion. Thanks for bearing
with me.

"Dave Peterson" wrote:

I haven't seen xl2007, but did you follow the short course and copy that UDF
into a General module?

apprentice idiot wrote:

PPS: WHen I tried the MACRO as entered, I received the message: "No RETURN()
or HALT() function found on Macro Sheet". Please advise further.

"Dave Peterson" wrote:

Can you use a macro?

Are you using xl2k or higher?

If yes to both, you could use a little user defined function like:

Option Explicit
Function ReverseString(myStr As String) As String
ReverseString = StrReverse(myStr)
End Function

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

=======

Short course:
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel to test it out.

Put something like:
=reversestring(a1)
in an adjacent cell

Then copy this down the column and sort your data using this key.

apprentice idiot wrote:

I'd like to sort a row of columns wherein each cell would be sorted
alphabetically but in reverse order; i.e. a cell with the word MICROSOFT
would be sorted as "TFOSORCIM", and one with EXCEL would be sorted as "LECXE"
(This to get groupings of words by their endings: e.g., "-ment", "-ation",
"-ity", "-ship", etc.).

--

Dave Peterson


--

Dave Peterson