View Single Post
 
Old 01-09-2024, 08:19 PM
soroush.kalantari soroush.kalantari is offline Windows 10 Office 2021
Competent Performer
 
Join Date: Jun 2021
Posts: 115
soroush.kalantari is on a distinguished road
Default

Quote:
Originally Posted by p45cal View Post
likewise not sure but maybe
Code:
  Set rng = Selection
  Set rng0 = Range("range1")

  For i = 2 To 100
    Set rng0 = Union(rng0, Range("range" & i))
  Next i
 
  Union(rng, rng0).Select
@p45cal .Thank you very much. First code solved the problem.
Reply With Quote