P
Phil Hibbs
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.
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.