Moving 2 character from first to last

muhammad susanto

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

here my problem, i hope you could help me..

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]sample raw[/TD]
[TD]after formula[/TD]
[/TR]
[TR]
[TD]CV CIPTA TERESAN JAYA[/TD]
[TD]CIPTA TERESAN JAYA CV[/TD]
[/TR]
[TR]
[TD]CV SINAR SUKSES ABADI PEKANBARU[/TD]
[TD]SINAR SUKSES ABADI PEKANBARU CV[/TD]
[/TR]
[TR]
[TD]PT NUANSA PERTIWI[/TD]
[TD]NUANSA PERTIWI PT[/TD]
[/TR]
[TR]
[TD]...[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

note : red font just a clue..2 characters moved
without vba

thanks all..
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
hi Fazza,...

could you help me about this problem, adding mark comma (') after last text before 2 last string...

CIPTA TERESAN JAYA CV-------CIPTA TERESAN JAYA,CV (expected result)
NUANSA PERTIWI PT-----------NUANSA PERTIWI,PT
 
Upvote 0
Sure, Bpk

Some comment about the first question. I assumed in the initial question, your first post, that the text had no extra spaces. If there are, maybe just add a TRIM function. So instead of

=MID(A1,4,255)&" "&LEFT(A1,2)
=MID(TRIM(A1),4,255)&" "&LEFT(TRIM(A1),2)

Assuming again that there are no extra spaces, how about this?
=LEFT(A1,LEN(A1)-3)&","&RIGHT(A1,2)

cheers
 
Upvote 0
You already have good working solutions for both problems, but for interest here is a slightly different approach to each.

Original question:
=MID(A1&" "&A1,4,LEN(A1))

Follow-up:
=REPLACE(A1,LEN(A1)-2,1,",")
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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