References Using the Union or Intersect Method

VBA can create references by using methods that are the equivalents of the union operator (the comma) or the intersection operator (the space character) that can be used in worksheet formulas. The worksheet union operator creates a reference that includes multiple selections, for example, SUM(A1,B2,C3,D4,E5). The syntax of the corresponding VBA Union method is Union(ra/?ge7, range2,...). The worksheet intersection operator creates a reference that is common to two references (e.g., the expression F4:F6 E5:I5 returns the reference F5). The syntax of the corresponding VBA Intersect method is Intersect(rangel, range2). Both rangel and range2 must be range objects.

0 -1

Post a comment