Truncating Cells

chanmanx2k

New Member
Joined
Sep 24, 2015
Messages
14
Hello I need the letters cut off on the end of these cells. The letters vary from 1-2 characters and there is no space after the number. Some numbers are also decimals.

1ML - 1
450G - 450
120ML - 120
1.5ML - 1.5
 

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)
Use Text To Columns, delimited by "-"
You can keep the text as it will end up in a separate column from the values, or Skip 'em.
 
Upvote 0
=LOOKUP(9.9999999E+307,--LEFT(A1,LEN(A1)-{2,1}))


Excel 2010
AB
11ML1
2450G450
3120ML120
41.5ML1.5
Sheet1
Cell Formulas
RangeFormula
B1=LOOKUP(9.9999999E+307,--LEFT(A1,LEN(A1)-{2,1}))
B2=LOOKUP(9.9999999E+307,--LEFT(A2,LEN(A2)-{2,1}))
B3=LOOKUP(9.9999999E+307,--LEFT(A3,LEN(A3)-{2,1}))
B4=LOOKUP(9.9999999E+307,--LEFT(A4,LEN(A4)-{2,1}))
 
Upvote 0
Scott I've seen you use 9.9999999E+307 quite a lot and I understand how it works in the formula, but I just want to know why that number exactly? Would something like 9E+307 not be as effective? Or even 9E+300 for something easier to write/remember?
 
Upvote 0
[TABLE="class: grid, width: 100"]
<tbody>[TR]
[TD]1ML[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]450G[/TD]
[TD]450[/TD]
[/TR]
[TR]
[TD]120ML[/TD]
[TD]120[/TD]
[/TR]
[TR]
[TD]1.5ML[/TD]
[TD]1.5[/TD]
[/TR]
</tbody>[/TABLE]

Sorry I think I wasnt clear enough. Column 2 is what I want as the end result.
 
Upvote 0
I made a separate chart right next to each other and it worked. When I used the same formula for my existing sheet, I am getting #N/A
 
Upvote 0
Did you change the cell references? Can you give an example of what data it didn't work with?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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