question

glennyboy-2857 avatar image
0 Votes"
glennyboy-2857 asked erinding-msft commented

How to Separate text and numbers (with decimal point) from one cell into two columns

Good day!

How to separate text and numbers (with decimal point) from one cell into two columns;

Variant

METANTHR38
METCOPR41
STUDSLVR42
BLKLH10
NAVY43
SDDL9
GRY5
SDDL6.5
BLU6.5
WHT10.5
BLK11.5

Output

Text

METANTHR
METCOPR
STUDSLVR
BLKLH
NAVY
SDDL
GRY
SDDL
BLU
WHT
BLK

Numbers

38
41
42
10
43
9
5
6.5
6.5
10.5
11.5

Thank you!


office-excel-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

erinding-msft avatar image
1 Vote"
erinding-msft answered erinding-msft commented

@glennyboy-2857

To separate text and numbers, you can use a formula based on the FIND function, the MIN function, and the LEN function with the LEFT or RIGHT function, depending on whether you want to extract the text or the number.

Take Excel 2016 on my computer as an example.
1. Enter the ‘variant’ in cell A2:A12.
2. To extract just the text to cell C2, use the formula =LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1) in cell C2.
Where the formula =MIN(FIND({0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9} ,A2&“0123456789”)) means the starting position of the number. In this case, the starting position of the number in cell A2 is ‘9’.
3. To extract just the number to cell D2, use the formula =RIGHT(A2,LEN(A2)-MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))+1) in cell D2.
4. Drag the lower right corner of cell B2 to B12 and of C2 to C12.
This step is to quickly copy the formula to other cells.
33889-a.png


Result:
33807-b.png
33808-c.png


Regards,
Erin


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


a.png (18.0 KiB)
b.png (23.1 KiB)
c.png (23.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

hi @erinding-msft , thank you very much for your help!

0 Votes 0 ·

@glennyboy-2857

It's my pleasure to help you~

Regards,

Erin

1 Vote 1 ·
HerbertSeidenberg-6295 avatar image
1 Vote"
HerbertSeidenberg-6295 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.