Text after sign need to separate

DIPASGL

New Member
Joined
Oct 26, 2022
Messages
39
Office Version
  1. 2003 or older
Platform
  1. Windows
Hi all

I would like to separate text and number in a cell after hyphen sign, then multiply with quantity.

On left side my description has got 1000l or 20l or .45kg etc sometimes and I want the result as per last column 3000(1000*3) so on - Thanks

DIESEL MAX 15W/40 CK4 - 1000L33000
GEAR OIL 80W/90 - 20L32640
HYDRAULIC 32 - 20L16320
HYDRAULIC 46 - 20L32640
HYDRAULIC 46 - 1000L22000
HYDRAULIC 68 - 1000L1010000
HYDRAULIC H 68 - 1000L11000
GREASE LX2 - 0.45KG640288
GREASE LXMO2 - 180KG1180
 
Try this

23 06 14.xlsm
ABC
1
2DIESEL MAX 15W/40 CK4 - 1000L33000
3GEAR OIL 80W/90 - 20L32640
4HYDRAULIC 32 - 20L16320
5HYDRAULIC 46 - 20L32640
6HYDRAULIC 46 - 1000L22000
7HYDRAULIC 68 - 1000L1010000
8HYDRAULIC H 68 - 1000L11000
9GREASE LX2 - 0.45KG640288
10MT BRAKE CLEANER - 400G9638.4
11GEAR SYN - 75W/90 -200g9619.2
12GREASE LXMO2 - 180KG1180
DIPASGL (2)
Cell Formulas
RangeFormula
C2:C12C2=LEFT(TRIM(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",20)),20)),LEN(TRIM(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",20)),20)))-2+ISNUMBER(-LEFT(RIGHT(A2,2),1)))/IF(AND(RIGHT(UPPER(A2),1)="G",LEFT(RIGHT(UPPER(A2),2),1)<>"K"),1000,1)*B2
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Yes Peter, this is something new I am working on. More dashes and with or without space after dash. Do you have solution for this please? Thanks
 
Upvote 0
@DIPASGL
I have removed the 'Mark as solution' from post #13 since that post does not contain a solution. If that was meant to indicate the earlier post contained a suitable solution then you can mark that earlier one. If no post still is what you are after then don't mark any. Thanks.
 
Upvote 0
@DIPASGL
I have removed the 'Mark as solution' from post #13 since that post does not contain a solution. If that was meant to indicate the earlier post contained a suitable solution then you can mark that earlier one. If no post still is what you are after then don't mark any. Thanks.
Sure Peter, sorry to be pain but can you help me with below
46.24L
72.34L
22.93L
56.49L
57.11L
43.38L
51.01L
Just want to get right side 46.24, 72.34 so on. I mean want no only but with decimal . Thanks in advance
 
Upvote 0
If the numerical values are 5 characters like all your samples, then
Excel Formula:
=LEFT(A1,5)+0
 
Upvote 0
You're welcome.

I have removed the 'Mark as solution' again. This time from post 18. It is not the answer to the original thread question. Please mark the post that best answered that original question as this will help future readers who are looking for a similar thing.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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