|
ごめんね、セル範囲がまちがってました m(_ _)m
ついでに、β さんのアドバイスにしたがって、複数セル範囲を一括クリア(Delete)
した場合にも対応するように、◆か所の Exit For をコメント化しておきます。
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Dim r As Range
Dim ss As String, zz As String
Dim i As Long
If Target.Column <> 3 Then Exit Sub
zz = "C13:C14,C64:C65,C115:C116,C166:C167,C219:C220,"
zz = zz & "C248:C249,C277:C278,C306:C307"
ss = "CEGIDFHJ"
For Each r In Range(zz).Areas
i = i + 1
If Not (Intersect(Target, r) Is Nothing) Then
Set c = Worksheets("メニュー").Range(Mid$(ss, i, 1) & "10")
If WorksheetFunction.CountBlank(r) = 2 Then
c.ClearContents
Else
c.Value = "印 刷"
End If
'Exit For '◆使わない
End If
Next
End Sub
|
|