James Patterson is the #1 New York Times bestselling author of many books, including the blockbuster series MAXIMUM RIDE. More than 100 million of his books are in print around the world, making him one of the top-selling writers of all time.
You can refer a name range in VBA code like below: Range(â<range name>â) Above statement returns a 2 dimensional array which is holding all the values in the named range in (x, y) format where x = Row, y= Column. Note: If named range is having only one cell then Range(â<range name>â) will return that one value.
The worksheet has a Range property which you can use to access cells in VBA. The Range property takes the same argument that most Excel Worksheet functions take e.g. âA1â, âA3:C6â etc. The following example shows you how to place a value in a cell using the Range property.ou can also write from an array to a range of cells. If you are not familiar with arrays you can check them out in this post: The Complete Guide to Arrays in Excel VBA. The following code shows an example of using an array with a range. Keep in mind that the array created by the read is a 2 dimensional array.