ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating an array from non-contiguous ranges (https://www.excelbanter.com/excel-programming/277140-creating-array-non-contiguous-ranges.html)

David

Creating an array from non-contiguous ranges
 
Is there an efficient way of creating a multidimensional
array from non-contiguous ranges?

The following only works because the ranges are contiguous:

Dim vaData As Variant
vaData = Range("A17:R18","A19:R20").Value

Tom Ogilvy

Creating an array from non-contiguous ranges
 
Only by doing it a cell at a time.

--
Regards,
Tom Ogilvy

"David" wrote in message
...
Is there an efficient way of creating a multidimensional
array from non-contiguous ranges?

The following only works because the ranges are contiguous:

Dim vaData As Variant
vaData = Range("A17:R18","A19:R20").Value





All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com