Formula to extract the number

wrighty998

New Member
Joined
Jan 31, 2018
Messages
35

<tbody>
</tbody>

please can someone help with these 2 things i need a formula to exctract the number
this one

Delivery Area: 01 - Glasgow / Edinburgh

i need the "01"



and this one

Company Code: 99 & 499 Delivery Yr/Wk: 2018 / 12 Product Category: ALL CATEGORIES

i need the "12"

thanks for any help
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Some clarification would help.

1. How do we determine which number(s) you want extracted? Give us some 'rules' in words. (eg The number after "Area:" or the number immediately before "Product Category:" etc)

2. You say you want a number extracted but your first example is "01". "01" is actually text and the number itself is 1. Which do you want as your result?
 
Upvote 0
Some clarification would help.

1. How do we determine which number(s) you want extracted? Give us some 'rules' in words. (eg The number after "Area:" or the number immediately before "Product Category:" etc)

2. You say you want a number extracted but your first example is "01". "01" is actually text and the number itself is 1. Which do you want as your result?


thankyou for your reply,


input cell


Delivery Area: 01 - Glasgow / Edinburgh

output cell

01

yes please anything after "Area:" and before the "-" for this one



input cell

Company Code: 99 & 499 Delivery Yr/Wk: 2018 / 12 Product Category: ALL CATEGORIES

output cell

12

anything after "/" and before the "Product" for this one
 
Upvote 0
OK, test these.

Excel Workbook
AB
1Delivery Area: 01 - Glasgow / Edinburgh01
2
3Company Code: 99 & 499 Delivery Yr/Wk: 2018 / 12 Product Category: ALL CATEGORIES12
Extract Number
 
Upvote 0
OK, test these.

Extract Number


AB
Delivery Area: 01 - Glasgow / Edinburgh


Company Code: 99 & 499 Delivery Yr/Wk: 2018 / 12 Product Category: ALL CATEGORIES

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:573px;"><col style="width:41px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]

[TD="align: right"]01[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]

[TD="align: right"]12[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
B1=TRIM(REPLACE(LEFT(A1,FIND("-",A1)-1),1,FIND(":",A1),""))
B3=TRIM(RIGHT(SUBSTITUTE(LEFT(A3,SEARCH("Product",A3)-1),"/",REPT(" ",20)),20))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

thanks thats brill life saver for the amount of info i have at work :-)
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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