
Originally Posted by
dsrt16
What does If Not Intersect mean?
Intersect is a function that returns a Range object that is the intersection of all the ranges listed as arguments to it. In this case it will give you the intersection between cell c1 and Range rngInvoiceCategory. If c1 is in rngInvoiceCategory, then their intersection is c1. If c1 is not in rngInvoiceCategory, then the result is Nothing. Nothing is a special value for an object that indicates that the object is not set to reference anything (this would require a longer explanation about how objects work). For our purposes here, if the function returns Nothing, it means there is no intersection among the ranges listed. Putting a Not in front means the opposite. So in this particular case,
Not Intersect(c1, rngInvoiceCategory) Is Nothing
means "c1 is within range rngInvoiceCategory"
Bookmarks