Delete words in a single column

i8ur4re

Board Regular
Joined
Mar 1, 2015
Messages
97
I have column F10 where i have the "Quantity", in each cell, I have a number + cases or each or lbs, or Cases. I want to remove the words, just keep the number. Any help, scripts are welcome. Thank you

[TABLE="width: 500"]
<tbody>[TR]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]1 Cases
[/TD]
[/TR]
[TR]
[TD]1 cases[/TD]
[/TR]
[TR]
[TD]11 lbs[/TD]
[/TR]
[TR]
[TD]3 each[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Assuming number always comes first followed by a space.
Excel Workbook
FG
2QuantityNum
31 Cases1
41 cases1
511 lbs11
63 each3
Sheet1
 
Upvote 0
Is it always a number followed by a space, and then the words?
If so, then you can use "Text to Columns" on that column, choosing a delimiter of a single space (and choosing not to import the second field).
That will just leave you with the numbers.
 
Upvote 0
If you want to use VBA
Code:
Sub tr()
Dim c As Range, spl As Variant
With ActiveSheet
    For Each c In .Range("F2", .Cells(Rows.Count, "F").End(xlUp))
        spl = Split(c.Value, " ")
            c = spl(LBound(spl))
    Next
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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