Formula to clean up data

tesleen2025

New Member
Joined
Nov 23, 2016
Messages
13
Hi, I need a formula to clean up the below text. I only want the numbers from each section code.
So for 393.60(d) I only want to see 393.60
I'm having trouble with this one since they vary so much from code to code.

Section
396.11
393.60(d)
393.201(c)
393.47(e)
393.9T
396.3(a)(1)
393.51
393.90
393.45B2PC
393.90

<tbody>
</tbody>


Thank you,
tesleen
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the forums. Try out the below formula, hope this works for you. It assumes that all cells have a decimal within the number.

Enter the formula with Ctrl+Shift+Enter, not just Enter.

B2:
Code:
=IF(ISNUMBER(A2),A2,VALUE(LEFT(A2,SMALL(IF(ISERROR(VALUE(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1))),ROW(INDIRECT("1:"&LEN(A2)))),2)-1)))

SectionExtraction
396.11396.11
393.60(d)393.6
393.201(c)393.201
393.47(e)393.47
393.9T393.9
396.3(a)(1)396.3
393.51393.51
393.9393.9
393.45B2PC393.45
393.9393.9

<tbody>
</tbody><colgroup><col><col></colgroup>
 
Last edited:
Upvote 0
Hi, I need a formula to clean up the below text. I only want the numbers from each section code.
So for 393.60(d) I only want to see 393.60
I'm having trouble with this one since they vary so much from code to code.

Section
396.11
393.60(d)
393.201(c)
393.47(e)
393.9T
396.3(a)(1)
393.51
393.90
393.45B2PC
393.90

<tbody>
</tbody>


Thank you,
tesleen



Please follow the steps to perform this feature:

=SUMPRODUCT(MID(0&A1,LARGE(INDEX(ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))*ROW(INDIRECT("1:"&LEN(A1))),0,1),ROW(INDIRECT("1:"&LEN(A1))))+1,1)*10^(ROW(INDIRECT("1:"&LEN(A1)))-1))
Please let me know if you have any query.
 
Upvote 0
Hi Trustee,

I do not think that your formula will give OP what they want. Your formula removes the decimals therefore changing the number to go from something like 393.60 to 39360... and it also includes ALL numbers, which could 'technically' be what OP wants, but probably not, for instance your formula makes 396.3(a)(1) turn into 39631.

Please advise.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

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