Using the Union Method to Join Multiple Ranges : Range Union « Excel « VBA / Excel / Access / Word






Using the Union Method to Join Multiple Ranges

 
Sub unionDemo()
    Set UnionRange = union(range("Range1"), range("Range2"))
    With UnionRange
        .Formula = "=RAND()"
        .font.bold = True
    End With
End Sub

 








Related examples in the same category

1.Use Union when you want to generate a range from two or more blocks of cells.
2.Determining whether a range is contained in another range
3.Returns True if rng1 is a subset of rng2