NBVC
Well-known Member
- Joined
- Aug 31, 2005
- Messages
- 5,828
Hi again,
I have a macro to delete rows based on a selection of entire rows...it works fine.....
except, for some reason the data we get has some (possibly not printable white space in cells)...because there doesn't seem to be anything in them (i.e. Len(a1)=0)....yet they won't allow the row to delete. If I do an Edit|Go To and look for Constants, those "mysterious" cells get included in the selection....
I came up with this simple way to take care of it, but it takes forever since the user selects entire rows and not a specific range.
Is there a faster way to do this loop and clear those "empty-appearing" cells?
Thanks..
I have a macro to delete rows based on a selection of entire rows...it works fine.....
except, for some reason the data we get has some (possibly not printable white space in cells)...because there doesn't seem to be anything in them (i.e. Len(a1)=0)....yet they won't allow the row to delete. If I do an Edit|Go To and look for Constants, those "mysterious" cells get included in the selection....
I came up with this simple way to take care of it, but it takes forever since the user selects entire rows and not a specific range.
Is there a faster way to do this loop and clear those "empty-appearing" cells?
Code:
Dim c as Range
Set c = Selection
For Each c In Selection
If Len(c) = 0 Then c.ClearContents
Next c
Thanks..