Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort excel spreadsheet with hyperlink | Excel Discussion (Misc queries) | |||
Excel Open Dialog Improper Sort | Excel Discussion (Misc queries) | |||
sort from right to left in excel | Excel Discussion (Misc queries) | |||
Sort Ascending button - Excel 2003 | Excel Discussion (Misc queries) | |||
Sort Ascending button - Excel 2003 | Excel Discussion (Misc queries) |