Formula to Switch places

sakrams

Board Regular
Joined
Sep 28, 2009
Messages
59
Office Version
  1. 2016
Platform
  1. Windows
Good Afternoon Excel Gurus,

Need help from the gurus with a quick formula to achieve the following result. I have a lot of sheets to fix and all sheets have 1000's of rows.

Column A has tags starting with numbers and some starting with characters. I am trying to write a formula that can convert the tags starting with characters to switch as shown in the table below. If the tag is starting with numbers remain with no change in a new column. Is there a quick way of achieving that?

AB
10002654-STL0002654-STL
2000322-ST000322-ST
30005-STM0005-STM
40012-STM0012-STM
50016-STM0016-STM
60019-STM0019-STM
70020-STL0020-STL
80020-STM0020-STM
90021-STL0021-STL
100021-STM0021-STM
110050-STL0050-STL
120075-STM0075-STM
130076-STM0076-STM
140078-STL0078-STL
15STL-00010001-STL
16STL-00050005-STL
17STL-00100010-STL
18STL-00110011-STL
19STL-00130013-STL
20STL-00140014-STL
21STL-00160016-STL
22STL-00170017-STL
23SM-00040004-SM
24S-00110011-S
25STM-00130013-STM
26STM-00150015-STM
27STM-00540054-STM
28STM-00550055-STM
29STM-00578900057890-STM
30STM-005877005877-STM
31SS-00010001-SS
32STS-00040004-STS
33STS-00060006-STS
34STS-00070007-STS
35STS-00080008-STS

<tbody>
</tbody>
7JZK767t


7JZK767t
https://i.postimg.cc/prD4w5dv/SS.jpg

Thanks a million in advance.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Re: Help with a Formula to Switch places

Try this:

=IF(ISNUMBER(LEFT(A1)+0),A1,MID(A1&"-"&A1,FIND("-",A1)+1,LEN(A1)))
 
Upvote 0
Re: Help with a Formula to Switch places

Thanks for your help Phuoc, but this only returns "True"

Try this:

=IF(ISNUMBER(LEFT(A1)+0),A1,MID(A1&"-"&A1,FIND("-",A1)+1,LEN(A1)))
 
Upvote 0

Forum statistics

Threads
1,213,530
Messages
6,114,162
Members
448,554
Latest member
Gleisner2

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