Help modify existing formula to extract number from a cell

Wahabbashir

New Member
Joined
Apr 28, 2020
Messages
2
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have a sample of the following excel sheet

test data.JPG


I want basically the column A2 to return only the numbers. I have an existing formula. The only problem is if I look at Row 1,2 and 3 they start off from 1 instead of including the 0. I would like it retrieve any number even if they start with 0.

I have tried to change the format to say text but it does not help.

The formula I am currently using to extract only the numbers is

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

Thank you in advance.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,214,858
Messages
6,121,960
Members
449,057
Latest member
FreeCricketId

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