Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Reverse Text by Word??
I have several thousand rows with data similar to this:
Hen_On_NestRoosterwareChickenroosterKitchen Is it possible to reverse them so that they will read like this: KitchenChickenroosterRoosterwareHen_On_Nest In other words -- reverse the order -- enter the words from right to left, instead of left to right (as they are now)?? Thanks. Barb |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Reverse Text by Word??
How about: use the Text to Columns feature, using the as your
delimiter. This will split the strings into different columns; then write a formula along the lines of =D1&C1&B1&A1 to reverse the word order. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Reverse Text by Word??
Enter this small macro, then select the cells you want to convert and run the
macro. Sub backwards() Dim r As Range, st As String For Each r In Selection s = Split(r.Value, "") u = UBound(s) If u 0 Then st = s(u) For i = u - 1 To 0 Step -1 st = st & "" & s(i) Next r.Value = st End If Next If you are not familiar with macros, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student "The Moose" wrote: I have several thousand rows with data similar to this: Hen_On_NestRoosterwareChickenroosterKitchen Is it possible to reverse them so that they will read like this: KitchenChickenroosterRoosterwareHen_On_Nest In other words -- reverse the order -- enter the words from right to left, instead of left to right (as they are now)?? Thanks. Barb |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Reverse Text by Word??
You guys are *AMAZING*!! I can't tell you how much I appreciate the
help that you've both offered to me. Turned out, I was able to use both methods on this monster project of mine!! Thanks again. Barb Gary''s Student wrote: Enter this small macro, then select the cells you want to convert and run the macro. Sub backwards() Dim r As Range, st As String For Each r In Selection s = Split(r.Value, "") u = UBound(s) If u 0 Then st = s(u) For i = u - 1 To 0 Step -1 st = st & "" & s(i) Next r.Value = st End If Next If you are not familiar with macros, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student "The Moose" wrote: I have several thousand rows with data similar to this: Hen_On_NestRoosterwareChickenroosterKitchen Is it possible to reverse them so that they will read like this: KitchenChickenroosterRoosterwareHen_On_Nest In other words -- reverse the order -- enter the words from right to left, instead of left to right (as they are now)?? Thanks. Barb |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Transfer data from Text Form Fields in MS Word into Excel? | Excel Discussion (Misc queries) | |||
How to export text from Excel to Word | Excel Discussion (Misc queries) | |||
How to export text from Excel to Word | New Users to Excel | |||
Text disappears when word wrap is used | Excel Discussion (Misc queries) | |||
Text not copying as text from Word to Excel 2003 | Excel Discussion (Misc queries) |