Thursday, August 14, 2003

Sub fixIT()
Dim x As Range, y As Range, starter As Range

Set starter = Range("ad2")
Set x = Range(Range("AD1").Offset(1, 0), Range("AD1").End(xlDown))

For Each y In x
If y.Value <> starter.Value Then

If y.Row - starter.Row > 1 Then Range(starter.End(xlToLeft).Offset(1, 0), y.Offset(-1, -2)).ClearContents
Set starter = y
End If


Next y
End Sub

No comments:

Post a Comment