1     Dim Volume
 2 Private Sub Worksheet_Change(ByVal Target As Range)
 3     Dim Ran1 As Range, Ran2 As Range, UnionRan As Range
 4     Set Ran1 = Sheets("    ").Range("    ")
 5     Set Ran2 = Sheets("    ").Range("    ")
 6     Set UnionRan = Application.Union(Ran1, Ran2)
 7     Dim Rng As Range
 8     Set Rng = Application.Intersect(Target, SPEC)
 9     If Not Rng Is Nothing Then
10         Target = Volume
11     End If
12 End Sub
13 
14 Private Sub Worksheet_SelectionChange(ByVal Target As Range)
15     Dim Ran1 As Range, Ran2 As Range, UnionRan As Range
16     Set Ran1 = Sheets("    ").Range("    ")
17     Set Ran2 = Sheets("    ").Range("    ")
18     Set UnionRan = Application.Union(Ran1, Ran2)
19     Dim Rng As Range
20     Set Rng = Application.Intersect(Target, SPEC)
21     If Not Rng Is Nothing Then
22         Volume = Target
23     End If
24 End Sub