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