Pulling the number from the text

smalik

Board Regular
Joined
Oct 26, 2006
Messages
180
Office Version
  1. 365
Platform
  1. Windows
What is the best way to pull a number from the text?

Here is an example:
4+ years of experience ....
10+ years of experience ....

All of my cells have the similar text. I thought I could just use the left (A1,1) but then I came to an issue when the text says, "10+ years of experience ...

I tried Left (A1,2) formula but then the years with single digit pulls the "+"

Is there a way to just pull the number whether it is a single digit or two digits?

Any help is greatly appreciated.

Best,
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Will the number always have a + sign after it?
 
Upvote 0
Hi,

If there's always a "+", use B formula, otherwise, use C formula:

Book3.xlsx
ABC
14+ years of experience ....44
210+ years of experience ....1010
315 years of…15
Sheet1055
Cell Formulas
RangeFormula
B1:B2B1=LEFT(A1,FIND("+",A1)-1)+0
C1:C3C1=LEFT(A1,IFERROR(FIND("+",A1),FIND(" ",A1))-1)+0
 
Upvote 0
Solution
Another option if the + sign is always there is
Excel Formula:
=LEFT(A2,FIND("+",A2)-1)+0
which will convert the number into a real number
 
Upvote 0
Hi,

If there's always a "+", use B formula, otherwise, use C formula:

Book3.xlsx
ABC
14+ years of experience ....44
210+ years of experience ....1010
315 years of…15
Sheet1055
Cell Formulas
RangeFormula
B1:B2B1=LEFT(A1,FIND("+",A1)-1)+0
C1:C3C1=LEFT(A1,IFERROR(FIND("+",A1),FIND(" ",A1))-1)+0

Awesome .... This works. Thanks.
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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