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
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Do you still use Excel 2003? I don't know how to work with it but below are couple of options if you have updated to new versions

Book3
ABCD
1
2GREASE - 250L250250
3GREASE STRO 30 - 2.6KG2.62.6
4GREASE - .45KG.45.45
5GREASE - 250G250250
6
7
Sheet1
Cell Formulas
RangeFormula
B2:B5B2=LEFT(REPLACE(A2,1,SEARCH(" - ",A2)+2,""),AGGREGATE(15,6,SEARCH(CHAR(ROW($65:$90)),REPLACE(A2,1,SEARCH(" - ",A2)+2,"")),1)-1)
C2:C5C2=TEXTBEFORE(TEXTAFTER(A2," - "),(CHAR(ROW($65:$90))))
 
Upvote 0
=TEXTBEFORE(TEXTAFTER(A2," - "),(CHAR(ROW($65:$90))))
Thanks dear for reply but the above formulas not working . What about if I do not want to separate text with no , Can I use substitute formula and how?

for example, my rows contain different alphanumeric values. Lets say I have 2 apples, 3 oranges, 9 bananas in each row. Is there a way to automatically multiply them without having to manually enter the SUBSTITUTE formula?
 
Upvote 0
Here is a variation of a solution offered by @Sufiyan97 except the newer functions have been replaced with those available in older versions of Excel:
Book1
AB
1
2GREASE - 250G250
3GREASE STRO 30 - 2.6KG2.6
4GREASE - .45KG0.45
5GREASE - 250G250
try
Cell Formulas
RangeFormula
B2:B5B2=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)
 
Upvote 0
Also what is (CHAR(ROW($65:$90)))) in your formula shows?

=TEXTBEFORE(TEXTAFTER(A2," - "),(CHAR(ROW($65:$90))))
 
Upvote 0
Are you still using xl 2003 or older? If so none of the formulae supplied will work.
 
Upvote 0
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
What about this with your older version?

23 06 07.xlsm
AB
1GREASE - 250L250
2GREASE STRO 30 - 2.6KG2.6
3GREASE - .45KG0.45
4GREASE - 250G250
Extract Number
Cell Formulas
RangeFormula
B1:B4B1=REPLACE(LEFT(A1,LOOKUP(1,-MID(A1,ROW(INDEX(A:A,1):INDEX(A:A,99)),1),ROW(INDEX(A:A,1):INDEX(A:A,99)))),1,FIND("-",A1),"")+0


except the newer functions have been replaced with those available in older versions of Excel:
.. but AGGREGATE still requires 2010 or later. :)
 
Upvote 0
Here is a variation of a solution offered by @Sufiyan97 except the newer functions have been replaced with those available in older versions of Excel:
Book1
AB
1
2GREASE - 250G250
3GREASE STRO 30 - 2.6KG2.6
4GREASE - .45KG0.45
5GREASE - 250G250
try
Cell Formulas
RangeFormula
B2:B5B2=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 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)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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