intersection delete lock Revision 663061346233 (Mon Jan 14 2013 at 12:07) - Diff Link to this snippet: https://friendpaste.com/3DWujWgX971XCJpTHA1aqC Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920212223242526272829303132333435363738394041Option ExplicitFunction IsInter(r As Range, t As Range) As Boolean Dim first As Range Set first = r Dim last As Range Set last = r.Cells(r.Count) If first.Row <= t.Row Then If t.Row <= last.Row Then If first.Column <= t.Column Then If t.Column <= last.Column Then IsInter = True Exit Function End If End If End If End If IsInter = FalseEnd FunctionPrivate Sub Worksheet_Change(ByVal Target As Range) If IsInter(Range("A1:A10"), Target) Then If Target.Value <= 5 Then Call MsgBox("min") End If End If If IsInter(Range("A11:A15"), Target) Then If Target.Value <= 10 Then Call MsgBox("min") End If End If If IsInter(Range("B1:B15"), Target) Then If Target.Value <= 3 Then Call MsgBox("min") End If End IfEnd Sub