On 2002-04-05 13:02, NateO wrote:
I think I'll need a vacation after this post. But I think the best way to do this is to actually define a cell, not a row. That way if you insert or delete either columns or rows, your 3-cell area will update. Pick the top cell of the 3 and name it
mycell. Then right-click on the worksheet in question and place the following code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = Range("mycell").Address Then
Range(Range("mycell").Offset(1).Address).ClearContents
Range(Range("mycell").Offset(2).Address).ClearContents
End If
If Target.Address = Range(Range("mycell").Offset(1).Address).Address Then
Range(Range("mycell").Address).ClearContents
Range(Range("mycell").Offset(2).Address).ClearContents
End If
If Target.Address = Range(Range("mycell").Offset(2).Address).Address Then
Range(Range("mycell").Address).ClearContents
Range(Range("mycell").Offset(1).Address).ClearContents
End If
Application.EnableEvents = True
End Sub