on 11-10-2017 2:58 AM
Hi all,
Im looking for a clean way in VBA to take a 2d array & for segments of size foo, perform an action.
having trouble identifying a simple from X to Y condition I can loop over in order to have the master array split up for the follow up activities.
suggestions welcome.
Cheers
Daniel
I ended up just writing a function of my own to loop over the requisite ranges from Arr1 to Arr2 based on some inputs.
'Loop through each empty element of Arr2 and set its value
For j = 1 To UBound(Arr2, 2) 'Loop on columns
refCol = columnIndex(j) 'Get column index
For i = 1 To UBound(Arr2, 1) 'Loop on row
Arr2(i, k) = arr1(i + rowStart - 1, refCol) 'move vals
Next i
Next j
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.