Thread: Empty Cells
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
dk dk is offline
external usenet poster
 
Posts: 129
Default Empty Cells

Thanks for reply
but we get a error debug 13
Also can we select specifc cells to run macro

"Gary''s Student" wrote:

To empty cells, select them and touch the Delete key.

To remove non-numeric characters from cells, select them and run this macro:

Sub numerifyy()
For Each r In Selection
v = r.Value
L = Len(v)
s = ""
For i = 1 To L
ch = Mid(v, i, 1)
If ch Like "*[-0-9]*" Or ch = "." Then
s = s & ch
End If
Next
If Len(s) 0 Then
r.Value = --s
End If
Next
End Sub



--
Gary''s Student - gsnu200805


"dk" wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell