Thread: Dont intersect
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Dont intersect

There is no built in function that does this.

one way would be to loop through all the cells and build a union of cells
not in the intersection.

If you want to use a scratch sheet
Union(rngA,rngb).Formula = "1"
InterSect(rngA,rngB).ClearContents
set rngNot = Union(rngA,rngB).SpecialCells(xlconstants,xlNumber s)

rngNot.ClearContents

--
Regards,
Tom Ogilvy

JethroUK© wrote in message
...
if:
application.intersect(rnga,rngb).select

selects the range where both ranges intersect

how do i select (identify) the range where they DONT intersect?

or is there a method of UNunion? - i.e remove a range from an existing
range?