Moving numbers within text string from one cell to another

Ride The Lightning

Board Regular
Joined
Jul 14, 2005
Messages
238
Hi

I have data in Column A: 1And, 3And, 12And etc

I am trying to retrieve the numbers in The cells in column A and move them to column B, so Columns A and B should read: (A) And, And, And (B) 1, 3, 12.

I have tried the "Text to Columns" wizard but I can only move certain parts of the text string and not just the numbers.

Is there a formula to achive this?

Regards

RTL
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi

I have data in Column A: 1And, 3And, 12And etc

I am trying to retrieve the numbers in The cells in column A and move them to column B, so Columns A and B should read: (A) And, And, And (B) 1, 3, 12.

I have tried the "Text to Columns" wizard but I can only move certain parts of the text string and not just the numbers.

Is there a formula to achive this?

Regards

RTL
Is the alpha portion of the string ALWAYS the 3 letters And?

How many digits can the number portion be? Any leading zeros?
 
Upvote 0
No, it is not always 3 letters it can vary.

The number position can be 3 digits and no leading zeros.
Try something like this...

Book1
ABC
11And1And
22And2And
312And12And
4123MoreStuff123MoreStuff
Sheet1

This formula entered in B1 and copied down to extract the number portion of the string:

=-LOOKUP(0,-LEFT(A1,{1,2,3}))

This formula entered in C1 and copied down to extract the alpha portion of the string:

=MID(A1,LEN(B1)+1,100)

Adjust the 100 value if the alpha portion of the string is more than 100 characters in length.
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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