Reverse Text with Criteria not All text can be reversed

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,089
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

i have problem how to reverse order text with criteria like this :
Excel 2013 64 bit
[TABLE="class: head"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[TH][/TH]
[TH]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]F[/COLOR]​
[/TH]
[TH]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]G[/COLOR]​
[/TH]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]4[/COLOR]​
[/TD]
[TD]PT THE BIS BOSS[/TD]
[TD]THE BIS BOSS, PT[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]5[/COLOR]​
[/TD]
[TD]CV. MAKE YOU HAPPY[/TD]
[TD]MAKE YOU HAPPY, CV[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]6[/COLOR]​
[/TD]
[TD]H. MICHAEL NOORMAN[/TD]
[TD]MICHAEL NOORMAN, H[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]7[/COLOR]​
[/TD]
[TD]THE LION KING[/TD]
[TD]THE LION KING[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]8[/COLOR]​
[/TD]
[TD]MICHAEL JORDAN FRANKY LARGE[/TD]
[TD]MICHAEL JORDAN FRANKY LARGE[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=888888]#888888[/URL] "]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]9[/COLOR]​
[/TD]
[TD]ETC..[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid"]
<tbody>[TR]
[TD]Sheet: Sheet1[/TD]
[/TR]
</tbody>[/TABLE]

i have use :
=MID(TRIM(A1);4;255)&", "&LEFT(TRIM(A1);2)
but not fully working for the lion king.....and michael jordan not work for both

how to make work well...

thanks/m.susanto
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
maybe like this more clear :

Excel 2013 64 bit
[Table="width:, class:head"][tr=bgcolor:#888888][th] [/th][th]
F
[/th][th]
G
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
3
[/td][td=bgcolor:#FFFF00]NAME/INPUT[/td][td=bgcolor:#FFFF00]EXPECTED RESULT[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
4
[/td][td]PT THE BIS BOSS[/td][td]THE BIS BOSS, PT[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
5
[/td][td]CV. MAKE YOU HAPPY[/td][td]MAKE YOU HAPPY, CV[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
6
[/td][td]H. MICHAEL NOORMAN[/td][td]MICHAEL NOORMAN, H[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
7
[/td][td]THE LION KING[/td][td]THE LION KING[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
8
[/td][td]MICHAEL JORDAN FRANKY LARGE[/td][td]MICHAEL JORDAN FRANKY LARGE[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#888888]
9
[/td][td]ETC..[/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet1[/td][/tr][/table]
 
Last edited:
Upvote 0
From those examples, this is the best I can guess. If that is not what you need, in words, can you give us some "rules" about when to move the first text to the end and when not to?

Excel Workbook
FG
3NAME/INPUTEXPECTED RESULT
4PT THE BIS BOSSTHE BIS BOSS, PT
5CV. MAKE YOU HAPPYMAKE YOU HAPPY, CV
6H. MICHAEL NOORMANMICHAEL NOORMAN, H
7THE LION KINGTHE LION KING
8MICHAEL JORDAN FRANKY LARGEMICHAEL JORDAN FRANKY LARGE
Reorder text
 
Upvote 0
hi peter..

once again using your formula for the text below can reverse too
m. jack pablo aimar
m alan tahli major

how to make for only text with "m......" can not be reversed? should be still:
m. jack pablo aimar
m alan tahli major
 
Upvote 0
I'm not certain what you are saying. Are you saying that both of those should stay exactly as they were?
 
Upvote 0
Try
=IF(OR(FIND(" ",SUBSTITUTE(F4,".","")&" ")>3,LEFT(F4,2)="m ",LEFT(F4,3)="m. "),F4,SUBSTITUTE(MID(F4&", " & F4,FIND(" ",F4)+1,LEN(F4)+1),".",""))
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top