Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

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.).
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SORT RIGHT-TO-LEFT IN EXCEL

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 430
Default SORT RIGHT-TO-LEFT IN EXCEL

Interesting question, one of the real gurus might have a solution but I can't
think of a way to easily reverse words. You could try just looking at the
right hand side of your words for grouping, for example try a formula like
this:

=RIGHT(A1,4)

It will give you only the 4 right hand most letters of your word in A1, the
problem of course is the fact that in some case you want to look at the last
4 letter, some the last 3 letters, some the last 5. Perhaps this will put
you on the (pardon the pun) right track.

"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.).

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

I'm using Office2007 beta. Unfortunately, the crash course resulted in a
collision with my rank ignorance; and the latter, pulling rank, won.
What module would I paste in and what would be its form?

Also, when I paste in "=reversestring(a1)" into a cell/column, I get "#NAME?"

Please advise.

"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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

PS: I had pasted "Option Explicit
Function ReverseString(myStr As String) As String
ReverseString = StrReverse(myStr)
End Function"
into the MACRO as directed, but it made no never mind.


"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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

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

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SORT RIGHT-TO-LEFT IN EXCEL

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
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

I followed the short course, copied the module into a General module, and
entered "=reversestring(B2)" into all the rows corresponding to the list on
Worksheet1. While each cell thereof asks "#NAME?", the insert function shows
the function argument questioning B2 with #VALUE (in red) after the equal
sign.
I'd be happy to send you a truncated version of the sheet with the UDF and
formula saved in a compatible format, so that you might see for yourself. I
know not what else to do.

"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

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SORT RIGHT-TO-LEFT IN EXCEL

xl2007 added a bunch of different excel file formats--with macros, without
macros....

Glad you found the solution.

apprentice idiot wrote:

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


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default SORT RIGHT-TO-LEFT IN EXCEL

I'm glad too. Only without your solution, it would have been a long, long row
to hoe.
Perhaps you could offer a solution for DECONCATENATING IN EXCEL2007 in the
same forum.

"Dave Peterson" wrote:

xl2007 added a bunch of different excel file formats--with macros, without
macros....

Glad you found the solution.

apprentice idiot wrote:

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


--

Dave Peterson

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SORT RIGHT-TO-LEFT IN EXCEL

You may want to select your column (or a range in a single column), then try
Data|Text to columns.

Depending on your rules for parsing the data, it might work.

apprentice idiot wrote:

I'm glad too. Only without your solution, it would have been a long, long row
to hoe.
Perhaps you could offer a solution for DECONCATENATING IN EXCEL2007 in the
same forum.

"Dave Peterson" wrote:

xl2007 added a bunch of different excel file formats--with macros, without
macros....

Glad you found the solution.

apprentice idiot wrote:

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


--

Dave Peterson


--

Dave Peterson
Reply
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
sort excel spreadsheet with hyperlink jannkatt Excel Discussion (Misc queries) 0 June 13th 06 01:39 PM
Excel Open Dialog Improper Sort [email protected] Excel Discussion (Misc queries) 4 May 17th 06 02:40 PM
sort from right to left in excel colekom Excel Discussion (Misc queries) 2 May 12th 06 01:08 AM
Sort Ascending button - Excel 2003 Ann Scharpf Excel Discussion (Misc queries) 0 May 23rd 05 11:11 PM
Sort Ascending button - Excel 2003 bigwheel Excel Discussion (Misc queries) 1 May 23rd 05 11:10 PM


All times are GMT +1. The time now is 10:55 AM.

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

About Us

"It's about Microsoft Excel"