find only numbers in text string

billyheanue

Board Regular
Joined
Jul 13, 2015
Messages
109
Looking for a formula to start with below, and return the following. Basically multiplying 6*50, 5*100, 10*100, 12*50, and so on.

Start with:
CS/6 BX/50 EA
CS/5 BX/100 EA
CS/10 BX/100 EA
CS/12 BX/50 EA

Returns:
300
500
1000
600

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
this works for examples shown

Code:
=(MID(A1,FIND("/",A1,1)+1,2))*50

EDIT

this is slightly more robust formula

Code:
=(MID(A1,FIND("/",A1,1)+1,LEN(LEFT(A1,FIND(" ",A1,1)))-4))*50
 
Last edited:
Upvote 0
Try

=TRIM(MID(A1,FIND("CS",A1)+3,2))*TRIM(MID(A1,SEARCH("BX",A1)+3,3))

much better than solution i was working on

Code:
=(MID(A1,FIND("/",A1,1)+1,LEN(LEFT(A1,FIND(" ",A1,1)))-4))*(LEFT(TRIM(LEFT(RIGHT(SUBSTITUTE("/"&A1,"/",REPT(" ",300)),300),300)),FIND(" ",TRIM(LEFT(RIGHT(SUBSTITUTE("/"&A1,"/",REPT(" ",300)),300),300)),1)))
 
Upvote 0
Another alternative would be to do TextToColumn. Delimit your data by a 'space' and '/', then export only the column with numbers.

Excel 2010
ABCDE
1DataText to columnResult
2CS/6 BX/50 EA650300
3CS/5 BX/100 EA5100500
4CS/10 BX/100 EA101001000
5CS/12 BX/50 EA1250600
Sheet1
Cell Formulas
RangeFormula
E2=C2*D2
E3=C3*D3
E4=C4*D4
E5=C5*D5
 
Upvote 0

Forum statistics

Threads
1,215,492
Messages
6,125,115
Members
449,206
Latest member
burgsrus

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