Extract two sets of numbers between text in cell

johnbrownbaby

New Member
Joined
Dec 9, 2015
Messages
38
Hello,

I have the text in a cell:
eFine: 2404852 eFood: 12827

I wanted to extract the numbers and place them in two separate columns:

Test 1Amp
240485212827

I tried this formula

=IF(SUM(LEN(A8)-LEN(SUBSTITUTE(A8, {"0","1","2","3","4","5","6","7","8","9"}, "")))>0, SUMPRODUCT(MID(0&A8, LARGE(INDEX(ISNUMBER(--MID(A8,ROW(INDIRECT("$1:$"&LEN(A8))),1))* ROW(INDIRECT("$1:$"&LEN(A8))),0), ROW(INDIRECT("$1:$"&LEN(A8))))+1,1) * 10^ROW(INDIRECT("$1:$"&LEN(A8)))/10),"")

but I got all the numbers: 240485212827

Can you help me separate out the numbers to get the table shown above?

Thanks!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Do your entries always follow the format:
WORD - SPACE - NUMBER - SPACE - WORD - SPACE - NUMBER

If they do, then you can use this formula for the first number:
Excel Formula:
=TRIM(MID(SUBSTITUTE(A8," ",REPT(" ",100)),100,100))
and this one for the second:
Excel Formula:
=TRIM(MID(SUBSTITUTE(A8," ",REPT(" ",100)),300,100))
 
Upvote 0
Solution
One formula for office 365

Excel Formula:
=TRANSPOSE(FILTERXML("<x><y>"&SUBSTITUTE(SUBSTITUTE(A1,": "," ")," ","</y><y>")&"</y></x>","//y[number()=.]"))
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: VBA script to extract numbers and place in two separate columns - OzGrid Free Excel/VBA Help Forum
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: VBA script to extract numbers and place in two separate columns - OzGrid Free Excel/VBA Help Forum
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Understood!

Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,661
Messages
6,120,797
Members
448,994
Latest member
rohitsomani

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