View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Range Minus operator?

It saves them, deletes them to find the non-intersect, and then restores.

Try it before saying it isn't what you want.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Zbigniew Malinowski" wrote in message
...
What exactly your procedure does? It deletes all the cells in a Range?

It's really not what I am looking for...

Użytkownik "Bob Phillips" napisał w
wiadomości ...
Here is a function that works okay from VBA returning a range object

'-----------------------------------------------------------------
Function AntiUnion(SetRange As Range, UsedRange As Range) As Range
'-----------------------------------------------------------------
Dim saveSet
saveSet = SetRange.Formula
SetRange.ClearContents
UsedRange = 0
Set AntiUnion = SetRange.SpecialCells(xlCellTypeBlanks)
SetRange = saveSet
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Zbigniew Malinowski" wrote in message
...
Hi,

I'm working on an Excel 2000 application. It could be very useful if I

could
use something like MINUS operator for Range objects.

Ex. I can do INTERSECT to find a common Range. I can use UNION to find

a
sum
of Ranges. But can I find a part of a Range that is not included in

another
Range object?

I'm surprized but I'm unable to find something like this.

Any help apprectiated

Zbig