Move 4th Charachter to !st

D

Dennis

I would like move the 4th charachter to the first for every entry in column B.

Ex: change 007C to C007.

Is there a way to do this for about 2000 entries?

Dennis
===============
 
J

John Wilson

Dennis,

One way......
Temporarily insert a column to the right of Column B
Place the following formula in the first cell of that column
(assuming it's row 1 but you can modify that to suit)
=MID(B1,4,1)&LEFT(B1,3)
Now copy down as far as you need to.
Then Copy that column and Paste Special Values
over onto Column B and then delete the temporary column.

John
 
P

Paul Corrado

If they are all 4 characters, then using a helper column this formula will
change the text.

=CONCATENATE(MID(A1,4,1),LEFT(A1,3))

PC
 
B

Bruce Girvitz

Not very elegant, try this at c1 and copy down =MID(B1,4,1)&MID(B1,1,3) -
You need to copy - paste special (values only) on top of column b and then
remove column c.

Bruce Girvitz
 
T

Thomas

Select the entire range of numbers to change and then run this macro
Sub Rotate()
Dim cell
For Each cell In Selection
cell.value = Right(cell, 1) & Mid(cell, 1, 3)
Next
End Sub

Only select the cells you want changed as it will affect all that are
selected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top