Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
loading multiple non-contiguous range into an array
Jan,
I end up copy and paste the range into an spreadsheet. Then I read the entire range into an array. That works for me. Thanks. "Jan Karel Pieterse" wrote: Hi Matelot, I have a selection range that is non-contiguous and want to load them into an array. It only load the first range. set rng = range("A1:C2,A9:C10,A15:C18") myArray = rng.value Anything wrong with the code? can you suggest on how to best load all the ranges into an array. As you have discovered, you can only bulk-read contiguous ranges into an array. You'll have to loop through the Areas collection of the range and add each area's cells individually. Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Member of: Professional Office Developer Association www.proofficedev.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding the longest contiguous 1-d array of 0's | Excel Discussion (Misc queries) | |||
summing non-contiguous array cells | Excel Worksheet Functions | |||
filling array with non-contiguous range | Excel Programming | |||
change the 8th column in a not contiguous array | Excel Programming | |||
Loading Excel Array from VB Array Faster | Excel Programming |