bingobongo
New Member
- Joined
- Feb 8, 2016
- Messages
- 19
Hi,
I'm wondering if it's possible to have a 2x2 array of random values inserted into the centre of a 6x6 array of zeros.
0,0,0,0,0,0
0,0,0,0,0,0
0,0,x,x,0,0
0,0,x,x,0,0
0,0,0,0,0,0
0,0,0,0,0,0
I also need to be able to extract the 2x2 array from the 6x6 array for use later in the code.
This process of inserting and extracting happens several times within loops of my code so I'm trying to not have to loop through each position of the array if possible, since the 2x2 and 6x6 are just example sizes (The actual sizes needed are 8x8 and 22x22). I've tried looping through the large array one place at a time and inserting the small array as it went through but I found it was taking too long. I was hoping I could just read/write it in one line with some modified version of SmallArray = range("A1:B2") since that is much quicker.
Let me know if this is possible and/or if you need more information. Thanks
I'm wondering if it's possible to have a 2x2 array of random values inserted into the centre of a 6x6 array of zeros.
0,0,0,0,0,0
0,0,0,0,0,0
0,0,x,x,0,0
0,0,x,x,0,0
0,0,0,0,0,0
0,0,0,0,0,0
I also need to be able to extract the 2x2 array from the 6x6 array for use later in the code.
This process of inserting and extracting happens several times within loops of my code so I'm trying to not have to loop through each position of the array if possible, since the 2x2 and 6x6 are just example sizes (The actual sizes needed are 8x8 and 22x22). I've tried looping through the large array one place at a time and inserting the small array as it went through but I found it was taking too long. I was hoping I could just read/write it in one line with some modified version of SmallArray = range("A1:B2") since that is much quicker.
Let me know if this is possible and/or if you need more information. Thanks