VBA define a range as a variable and fill with random numbers

PHOTO EMBED

Sun Nov 14 2021 08:30:20 GMT+0000 (UTC)

Saved by @IsabellaLM #vba

Sub rangething()

Dim myrange As range

Set myrange = range("B5:H10")
myrange.Value = "=rand()"

End Sub
content_copyCOPY