Cell got number with decimal and text too - How to separate

DIPASGL

New Member
Joined
Oct 26, 2022
Messages
39
Office Version
  1. 2003 or older
Platform
  1. Windows
I have got column like below that has got L (liter), kg(kilogram) and so on. If I want to separate after highphyne - sign but also just want number including decimal (not with kg or g etc). How can I do . I want to achieve 250 , 2.6, .45 , .250 .Below is the problem
GREASE - 250L
GREASE STRO 30 - 2.6KG
GREASE - .45KG
GREASE - 250G
 
Thanks for reply but wt is 65:90 in below formula and how should I use this in my sheet

=0+LEFT(RIGHT(A2,LEN(A2)-FIND("- ",A2)-1),AGGREGATE(15,6,SEARCH(CHAR(ROW($65:$90)),RIGHT(A2,LEN(A2)-FIND("- ",A2)-1)),1)-1)
Thanks team but can I ask about below as above did not working on my excel. How to just remove text from numbers as below
450G
20L
1000kg
1000kiograms
20L
1L
200L
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Can you please confirm what version of Excel you are using?
 
Upvote 0
Hopefully you've seen Peter's solution, which is designed to work on your older version of Excel. Mine still will not work on versions prior to Excel 2010...sorry about that. The 65:90 construction used in the ROW function creates an array of {65;66;67;...;90}, which are the ASCII character codes for the capital letters A-Z. The CHAR function used the numeric array to return the array of capital letters {"A";"B";...;"Z"}, and this was used by the SEARCH function to determine where the units abbreviation began in the text string. But I see now that you have some units with lower case letters, so this would need further adjustment.

Please have a look at Peter's offering instead.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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