T
Todd
Hi, first I want to say thanks to all who have helped
me. I have really learned a lot form all of you. Right
now I am working on a macro that clears cells that don't
have color formatting in them anymore. It works ok if it
does not run into a cell with color. Then it doesn't
delete anything at all. How do I get it to ignore cells
with colors and keep searching and deleting those without?
Thanks again,
Todd
Sub DeleteCellswithNoColor()
For Each cell In Selection
If Selection.Interior.ColorIndex = xlNone Then
cell.ClearContents
Next cell
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
MsgBox "No more cells to check"
End Sub
me. I have really learned a lot form all of you. Right
now I am working on a macro that clears cells that don't
have color formatting in them anymore. It works ok if it
does not run into a cell with color. Then it doesn't
delete anything at all. How do I get it to ignore cells
with colors and keep searching and deleting those without?
Thanks again,
Todd
Sub DeleteCellswithNoColor()
For Each cell In Selection
If Selection.Interior.ColorIndex = xlNone Then
cell.ClearContents
Next cell
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
MsgBox "No more cells to check"
End Sub