Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find and replace all but numeric

Status
Not open for further replies.

andyfresh

Technical User
Oct 4, 2005
33
GB
Hi,

Is it possible to delete everything from a coloumn that isnt numeric??

Regards

Andy
 
For Each aCell In aRange
If IsNumeric(aCell.Value) Then
'do something here
End If
Next

the IsNumeric function tests if a 'value' can be numeric, the actual formatting in the cell could be text = 109 and IsNumeric would return true,,,all depends what you are really after. you could just test for the cell formatting i guess/....
 
Hi

What im trying to do is for example if a cell in column P = 120g x boxes then I would like it to delete all the text but the 120.

Andy
 
What aboiut the Val VBA function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top