Rearrange digits within a cell

Gene31705

New Member
Joined
Apr 5, 2013
Messages
10
I have several thousand "locations" that I need to modify. An example of a location is M110285AA. I need to change several digits to the location digits due to restructuring. The following is an example of current and desired.

CURRENT - DESIRED
M118502AA - M110285AA
A138612AA - A311286AA

Thanks for any help.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi.

Forgive me for not seeing it, but what precisely is the logic that determines the new order of characters in each case?

Regards
 
Upvote 0
The first letter is the warehouse. The next number is the bay, the next is the floor, the next TWO are the row and the last TWO digits are the isle. The AA is the level of pallets - AA bottom (ground), BA one above AA, CA two above AA (ground), etc. My biggest problems are the forty through the seventh digit. I need to swap these four digits (or these two sets of digits). Second, I need to swap the first two numbers like 13 to 31, etc.

I hope this clears it up. Thanks
 
Upvote 0
My biggest problems are the forty through the seventh digit. I need to swap these four digits (or these two sets of digits). Second, I need to swap the first two numbers like 13 to 31, etc.
Give this formula a try...

=LEFT(A1)&MID(A1,3,1)&MID(A1,2,1)&MID(A1,6,2)&MID(A1,4,2)&RIGHT(A1,2)
 
Upvote 0
Rick,

Unbelievable. You are my hero. I guess swapping the first two numbers (like 13 to 31 - after the warehouse letter) is just as simple - if you know what you're doing. Remember the locations A138612AA

Thanks a lot, you have saved me a lot of work.
 
Upvote 0

Forum statistics

Threads
1,196,498
Messages
6,015,557
Members
441,901
Latest member
joshtfin

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