Removing non #'s from cell (letters, - , #, etc)

Craig92604

Well-known Member
Joined
Nov 7, 2002
Messages
505
I need to remove all non- numbers from cells. I know there is a way to do this but my brain is fried today
 
Craig92604 said:
=SUBSTITUTE(AB13485,RIGHT(AB13485,SUMPRODUCT((LEN(AB13485)-LEN(SUBSTITUTE(AB13485,{0,1,2,3,4,5,6,7,8,9},""))))),"")

Didn't quite work for instance:

77R5158 = 7 WANTED: 775158

A-054-4M = A-05 WANTED: 544

76DB2408 =76 WANTED: 762408

?

That formula is meant for input like either

LLLDDDD

or

DDDLLLL

and not for

DLLLDL

LLDDDLLD

LLDDLLL

etc.
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,216,520
Messages
6,131,135
Members
449,626
Latest member
Stormythebandit

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