Pete
12-02-2008, 03:39 AM
See attached workbook
Hi Experts
i have been working on a clear contents macro that finally works fine, but how would i without make a complete pigs ears of the current macro add the following step.
just need the current macro once the data has been cleared from the 3 table(s) rows below the word milestone in each table.
to reset the number of empty/blank rows below the word milestone to five empty rows. Just that.
Sub ClearData()
Application.ScreenUpdating = False
Dim rng As Range, Cell As Range
Set rng = Range("A14:K" & Cells(65536, "B").End(xlUp).Row)
For Each Cell In rng
If (Range("B" & Cell.Row).Interior.ColorIndex = -4142 And Range("B" & Cell.Row).Font.Bold = False) Then
Cell.ClearContents
End If
Next Cell
Application.ScreenUpdating = True
End Sub
Hi Experts
i have been working on a clear contents macro that finally works fine, but how would i without make a complete pigs ears of the current macro add the following step.
just need the current macro once the data has been cleared from the 3 table(s) rows below the word milestone in each table.
to reset the number of empty/blank rows below the word milestone to five empty rows. Just that.
Sub ClearData()
Application.ScreenUpdating = False
Dim rng As Range, Cell As Range
Set rng = Range("A14:K" & Cells(65536, "B").End(xlUp).Row)
For Each Cell In rng
If (Range("B" & Cell.Row).Interior.ColorIndex = -4142 And Range("B" & Cell.Row).Font.Bold = False) Then
Cell.ClearContents
End If
Next Cell
Application.ScreenUpdating = True
End Sub