Separate numbers from a phrase in a cell

bright_mind

New Member
Joined
Apr 1, 2013
Messages
5
How do you separate numbers from a phrase in a cell given the scenarios below? All I need are the word/ phrases.

Here are sample contents of the cells:

the quick 89
quick 143
the quick brown 7
brown fox 23

As one can see, all the numbers are at the right end but the digits vary while the string portion ranges from one to four words.

I believe a simple RIGHT or FIND function does not work in this scenario. Text to Column does not work as well.

Thank you in advance for the replies.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
How do you separate numbers from a phrase in a cell given the scenarios below? All I need are the word/ phrases.

Here are sample contents of the cells:

the quick 89
quick 143
the quick brown 7
brown fox 23

As one can see, all the numbers are at the right end but the digits vary while the string portion ranges from one to four words.

I believe a simple RIGHT or FIND function does not work in this scenario. Text to Column does not work as well.

Thank you in advance for the replies.

Try...

B2:

=LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")-1))

C2:

=SUBSTITUTE(A2,B2,"")+0

where A2 houses a string with a number at the end.
 
Upvote 0
On the off-chance that you could possibly have a number in the text part but only want the number at the end... something like "The 3M Company ordered 123" (hard to tell what you might have from the made up text examples you posted)... then you can use this formula in place of Aladin's posted formula for cell B2...

=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",99)),99))

This formula finds whatever is after the last space character in the text (whether it is a number or not).
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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