Function InverseRange(rFull As Range, rPart As Range) As Range
Dim tmp As Range
Dim cel As Range
For Each cel In rFull.Cells
If Intersect(cel, rPart) Is Nothing Then
If tmp Is Nothing Then
Set tmp = cel
Else
Set tmp = Union(tmp, cel)
End If
End If
Next
Set InverseRange = tmp
End Function
|