|
▼こずえ さん:
これぐらいのセル数なら、すべてを毎回洗い替える、こんなコードでも。
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range
Dim c As Range
Dim p As Range
Dim x As Long
Set r = Range("C13:C14,C64:C65,C115:C116,C166:C167,C219:C220,C248:C249,C277:C278,C306:C307")
If Intersect(Target, r) Is Nothing Then Exit Sub
With Sheets("メニュー")
Set p = .Range("C10, E10, G10, I10, D10, F10, H10, J10")
p.Value = Empty
End With
For Each c In r.Areas
x = x + 1
If WorksheetFunction.CountBlank(c) < 2 Then p.Areas(x).Value = "印刷"
Next
End Sub
|
|