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

Quantity
1 Cases
1 cases
11 lbs
3 each

<tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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,214,861
Messages
6,121,971
Members
449,059
Latest member
oculus

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