Extracting a number with decimal and percentage from a text string

Jansiej

New Member
Joined
Feb 26, 2015
Messages
4
Hi,

Could anyone please assist with a formula. I am trying to extract a number with decimal and percentage sign from a stringed text.

As example it would read.

Cell: B243

We have decided to apply a rate of 10.5% in our calculations as this is deemed realistic.

The text string might change but there will always be a number with decimal and percentage in the sentence.

I need to extract only the 10.5% exactly as indicated in the sentence. I have tried a few formulas after using Google but have not managed to get it right.

Thank you so much!

Regards Jansie
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi and welcome to the board...
The celll is B243, but what exactly does the cell contains? What's the string?
 
Upvote 0
See if this will work.
B3 as text
B4 as number (format to %).
Excel Workbook
ABC
1We have decided to apply a rate of 10.5% in our calculations as this is deemed realistic.
2
3rate10.5%As text
410.50%As number
Sheet
 
Upvote 0
Thanks Caribeiro77

Hi and welcome to the board...
The celll is B243, but what exactly does the cell contains? What's the string?

The text string will read something like "We have decided to apply a rate of 10.5% in our calculations as this is deemed realistic."

Thank You
 
Upvote 0
I believe the value of B243 should be: "We have decided to apply a rate of 10.5% in our calculations as this is deemed realistic." and 10.5% needs to be found and extracted from that text. I have an idea how to make it work only on texts containing % in that format (it wouldn't work if it says 10.5 % - space between number and sign for instance). If you know that % will always stand right next to number I can fix it.
 
Upvote 0
Here is another formula for you to consider...

As text: =TRIM(RIGHT(SUBSTITUTE(LEFT(A1,FIND("%",A1))," ",REPT(" ",200)),200))

As number: =0+TRIM(RIGHT(SUBSTITUTE(LEFT(A1,FIND("%",A1))," ",REPT(" ",200)),200))

If you use the "as number" formula, you will have to format the cell as Percentage.
 
Upvote 0
Rick,
If there should be a space between the number and % sign (10.5 %) your formula seems to fail, but it is simpler and better than mine in this case.
 
Upvote 0
Hi,

the formula works like a magic. I have 2 numbers with % sign and I was able to extract 1st % sign number with this formula BUT now I want to extract the 2nd number with a % sign from the same cell and put them in a different cell. How do I do it?
 
Upvote 0

Forum statistics

Threads
1,225,468
Messages
6,185,162
Members
453,281
Latest member
shantor

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