XLA routines: EE_RangeUnion
Use EE_RangeUnion to add ranges together
- Takes up to 6 ranges
Function EE_RangeUnion(rng1 As range, Optional rng2 As range, Optional rng3 As range, _ Optional rng4 As range, Optional rng5 As range, Optional rng6 As range) As range 'http://excelexperts.com/xla-routines-eeRangeUnion for updates on this function If rng2 Is Nothing Then Set EE_RangeUnion = rng1 ElseIf rng3 Is Nothing Then Set EE_RangeUnion = Union(rng1, rng2) ElseIf rng4 Is Nothing Then Set EE_RangeUnion = Union(rng1, rng2, rng3) ElseIf rng5 Is Nothing Then Set EE_RangeUnion = Union(rng1, rng2, rng3, rng4) ElseIf rng6 Is Nothing Then Set EE_RangeUnion = Union(rng1, rng2, rng3, rng4, rng5) Else Set EE_RangeUnion = Union(rng1, rng2, rng3, rng4, rng5, rng6) End If End Function
»
- Nick's blog
- Login or register to post comments
- 2830 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago