Using VBA to assign range of cell values to array of variables

前端 未结 3 1035
迷失自我
迷失自我 2021-01-05 16:47

I\'m very new to VBA, to bear with me here.

I want to assign a set of variables the value of a set of ranges ie. run a brief code to simplify the following



        
3条回答
  •  悲&欢浪女
    2021-01-05 17:19

    Additional way to the above you can only use:

    Arr = ActiveWorksheet.Range("C1:C20").Value
    

    Then you can directly use:

    Arr(i,1) where i is C1 to C20 range!

提交回复
热议问题