Extract only numbers into 2 separate columns

strongman86

Board Regular
Joined
Feb 15, 2017
Messages
115
Office Version
  1. 2019
Platform
  1. Windows
Hi,

Looking for formula to extract numbers only from single cell containing text and numbers with variable length and can have space or no spaces between and "," or ".". Column A to extract from and B & C column desired result:
ABC
1Banana 123 Orange 54681235468
2Lime4587Strawberry7114587711
3Pear 4545 Melon 448745454487
4Lemon 65878Grape 544146587854414
5Orange Tree.9874 Pineapple mix, 51458987451458

Thank you.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Book1
ABC
1Banana 123 Orange 54681235468
2Lime4587Strawberry7114587711
3Pear 4545 Melon 448745454487
4Lemon 65878Grape 544146587854414
5Orange Tree.9874 Pineapple mix, 51458987451458
Sheet4
Cell Formulas
RangeFormula
B1:C5B1=INDEX(FILTERXML(CONCAT("<t><s>",IFERROR(--MID($A1,ROW(A$1:INDEX(A:A,LEN($A1))),1),"</s><s>"),"</s></t>"),"//s[.*0=0]"),COLUMN(A1))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Book1
ABC
1Banana 123 Orange 54681235468
2Lime4587Strawberry7114587711
3Pear 4545 Melon 448745454487
4Lemon 65878Grape 544146587854414
5Orange Tree.9874 Pineapple mix, 51458987451458
Sheet4
Cell Formulas
RangeFormula
B1:C5B1=INDEX(FILTERXML(CONCAT("<t><s>",IFERROR(--MID($A1,ROW(A$1:INDEX(A:A,LEN($A1))),1),"</s><s>"),"</s></t>"),"//s[.*0=0]"),COLUMN(A1))
Press CTRL+SHIFT+ENTER to enter array formulas.
Works perfectly. Much appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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