Good morning,
I ran into a problem yesterday with a macro I have used for a few months
without incident. I am receiving the following run-time error:
----------------
Run-time error '1004':
No cells were found.
----------------
My macro is supposed to look for blank cells in a given range, find them,
and deletes the entire row(s) found to contain the blank cells. The error
is now occuring because, for the first time, no blank cells exist, and I
failed to consider this possibility.
Here is the part of macro that fails when no blank cells are found.
-----------------
'delete rows with blank cells
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete
-----------------
How can I cope with cases where no blank cells in a given range exist and
then simply bypass this part of the macro? A conditional statement, I
assume. Any thoughts?
As always, thanks much for any help offered.
Best Regards,
Joseph
Bookmarks