Delte Text from a column

TayoMayo

New Member
Joined
Jul 24, 2014
Messages
22
Hey everyone,
I am pretty new to VBA and I am wondering if there is a way to delete text from a colum that has both numbers and letters in it. For example, if the column is one that is holding weight values, I would need to get rid of all the lbs, LBS, lbs., etc from the column and leave only the text. Is there a way to do this? I don't have any code to post, because I have no idea how to go about starting. Thank you for any and all replies.
 
Rick Rothstein,


hiker95,

Can you do me a favor? Would you run the code I posted in Message #22 against the workbook you downloaded and tell me if it works for you or not ? Thanks.

Sure.

Sample raw data in Sheet1:


Excel 2007
C
1475
2347 lbs
353kg
44753kgs
54 lbs
6534 LBS
753 KG
8453 LB
945 KGS
1034 LB
1153
12453
1345
1434
1553
16
Sheet1


After your LeaveNumbersOnly macro in reply #22:


Excel 2007
C
1#N/A
2#N/A
3116.845
410478.57
5#N/A
6#N/A
7116.845
8#N/A
999.20802
10#N/A
11#N/A
12#N/A
13#N/A
14#N/A
15#N/A
16
Sheet1
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,215,201
Messages
6,123,617
Members
449,109
Latest member
Sebas8956

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