Private
Sub
Workbook_SheetChange(
ByVal
Sh
As
Object
,
ByVal
Target
As
Range)
Dim
ws
As
Worksheet
Dim
checkRange
As
Range
Dim
cell
As
Range
Dim
wsCheck
As
Worksheet
Dim
lastRow
As
Long
Set
wsCheck = ThisWorkbook.Sheets(3)
If
Sh.Index >= 4
And
Sh.Index <= 12
Then
Set
checkRange = Sh.Range(
"E6:K34"
)
If
Not
Intersect(Target, checkRange)
Is
Nothing
Then
lastRow = wsCheck.Cells(wsCheck.Rows.Count, 1).
End
(xlUp).Row
Application.enableevents = false
For
Each
cell
In
wsCheck.Range(
"A1:A"
& lastRow)
If
cell.Value =
""
Then
wsCheck.Cells(cell.Row, 11).Value = 0
End
If
Next
cell
Application.enableevents = true
End
If
End
If
End
Sub