One of the basic steps to solve a lot of problems on Excel is to set a range in order to use it and reuse it as many times as you like during a procedure (Macro).
Sub SetaRange()
Dim Rng as Range
Set Rng=Range("A1:C10")
End Sub
With the code above you set a range named Rng (you can choose a different name if you prefer), consisting of all the cells from A1 to C10 on the Active Sheet.
No comments:
Post a Comment