Changing Domain names

briansterling

New Member
Joined
Aug 10, 2017
Messages
2
So I'm migrating a multitude of workstations from one domain to another and I have a very useful program to help me with this. One of the great features is it can draw from an excel file to rename the computers in the same process which is necessary since the new domain has different naming standards than we have now. Can anyone help me understand the formula/conditional formatting necessary to produce the type of results in the example table below?

Old Domain NameNew Domain Name
LOC(ation)5001(item ID)USLOC-LT-05001
LAP5549USTUS-LT-05549
SUR5112USTUS-LT-05112
CHA2745USCHA-LT-02745
CAR2786USCAR-LT-02786

<tbody>
</tbody>

I would need a way to:
- Isolate the last 4 numbers and add a zero
- Take the first three letters and make bring them over after inserting "US"
*but not if the three letters are "LAP"
- Insert the "-LT-0" between the location and the inventory number.

With how our names are now the results are bound to be quite messy but it would save a lot of time in giving me a base-line that I can go through and make corrections after the fact. I appreciate any assistance that is provided.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
How do you get these?

LAP5549 USTUS-LT-05549
SUR5112 USTUS-LT-05112

Otherwise,

A​
B​
C​
2​
LAP5549USLAP-LT-05549B2: ="US" & LEFT(A2, 3) & "-LT-0" & RIGHT(A2, 4)
3​
SUR5112USSUR-LT-05112
4​
CHA2745USCHA-LT-02745
5​
CAR2786USCAR-LT-02786
 
Upvote 0
- Take the first three letters and make bring them over after inserting "US"
*but not if the three letters are "LAP"
Based on your example...

Are we supposed to conclude that if the first three letters are "LAP", they should be changed to "TUS" before the "US" is placed in front of them?

Why are the first three letters "SUR" changed to "TUS" before the "US" is placed in front of them?
 
Upvote 0

Forum statistics

Threads
1,215,191
Messages
6,123,553
Members
449,108
Latest member
rache47

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