View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Steven B Steven B is offline
external usenet poster
 
Posts: 14
Default Clear "Blank" cells

Thank you Gary, running it now. Will report back on it's
effectiveness, but it looks like just the thing.

Would it execute faster to try something like this:

If Len(r.Value) = 0 Then
Rng = Union(IIf(Rng Is Nothing, R, Rng), R)
End if
If Not Rng Is Nothing Then Rng.Clear: Set OLMissing =
Nothing

I have disable screen updating, calculations and the status bar to
help, but it is slogging along.


On Jul 28, 11:56*am, Gary''s Student
wrote:
Try this:

Sub cleanup()
For Each r In ActiveSheet.UsedRange
* * If Len(r.Value) = 0 Then
* * * * r.Clear
* * End If
Next
End Sub

--
Gary''s Student - gsnu2007k



"Steven B" wrote:
Hello all,


I have found, in a number of my workbooks, ranges that contain cells
that appear to be blank, but excel treats them as though they have
data. When I sort a column ascending, these cells end up at the top of
my list. Selecting and clearing them removes whatever value is hidden
there and they no longer sort to the top of my lists.


I'd like to be able to find them and clear all of them in my workbook
but I can't figure out how to "find" them.


Thoughts?


Steven