Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Application.EnableEvents =
False
Dim
R&, C&, rng
As
Range, sumCell
As
Range
With
Target
R = .Row
C = .Column
Set
sumCell = Cells(R, 11)
If
R > 50
Or
.Value =
""
Then
sumCell =
""
Application.EnableEvents =
True
Exit
Sub
End
If
Select
Case
C
Case
Is
> 8,
Is
< 4:
Exit
Sub
End
Select
Set
rng = Range(Cells(R, 4), Cells(R, 8))
rng.ClearContents
If
.Value <>
"x"
Then
.Value =
"x"
sumCell = (8 - C) * Cells(R, 3)
End
With
Application.EnableEvents =
True
End
Sub