PDA

View Full Version : Solved: Deleting Text



sooty8
03-07-2008, 10:42 AM
Hi Experts

Can anybody help me solve the following I have "Sheet1" in an Excel Work Book that covers Columns A thru X and rows 3 thru 600 the cells are either Currency e.g. ?1,201.33 or Text - when I have finshed working on "Sheet1" I make a copy to "Sheet2" my problem is deleting the Text but leaving the Currency values in place on "Sheet2", the Currency or Text cells are spread allover the ranges,there are no merged cells however there will be some empty cells any help with a Macro or Routine would be much appreciated.

Thanks

Sooty8

Bob Phillips
03-07-2008, 12:20 PM
Here is a starter

[vba]

Public Sub Test()
Dim cell As Range

For Each cell In ActiveSheet.UsedRange

If Not IsNumeric(cell.Value) Then

cell.ClearContents
End If
Next cell
End Sub
/vba]

sooty8
03-07-2008, 01:15 PM
Hi XLD

Many thanks -- works a treat and just what I needed -- my scanning of sheets for useless text information has been solved -- genius sometimes comes in package you don't expect.
Sooty8:yay