View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Phil Hibbs Phil Hibbs is offline
external usenet poster
 
Posts: 100
Default I'm loving Interse

I really like the Intersect function. I use it a lot, for instance if my VBA wants to process every row that the user has selected:

Set ProcessRange = Intersect( ActiveSheet.UsedRange, Selection.EntireRow, Cells(1,1).EntireColumn )

It also removed duplciate selected cells. ProcessRange.Count tells me how many rows are selected.

Any time you process a set of selected cells, Intersect( Selection, ActiveSheet.UsedRange ) will remove thousands of redundant cells that you don't need to process.

Phil.