Rasm
11-01-2011, 04:39 AM
I am using the code below to move data from a two dimensional array to the worksheet – I would however like to only transpose certain elements within the array – so let’s say the array is 7 by 12 elements - is there a way to only transpose the elements 3,2 to 3,9 (my arrays are option base zero).
If this cannot be done – what is the best way to create a new array that only contain the elements 3,2 to 3,9 – that way I can still use the .transpose function. My arrays are quite large and I don’t want to use a loop – as it is too slow.
Astr = Split(Cells(1, ColFirst).Address, "$")(1) & LastRow + 1 & ":" & _
Split(Cells(1, ColFirst + UBound(Pnames) - 1).Address, "$")(1) & _
LastRow + 1 + UBound(WetChem, 2) - 1
ActiveSheet.Range(Astr).Value = Application.WorksheetFunction.Transpose(WetChem)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
If this cannot be done – what is the best way to create a new array that only contain the elements 3,2 to 3,9 – that way I can still use the .transpose function. My arrays are quite large and I don’t want to use a loop – as it is too slow.
Astr = Split(Cells(1, ColFirst).Address, "$")(1) & LastRow + 1 & ":" & _
Split(Cells(1, ColFirst + UBound(Pnames) - 1).Address, "$")(1) & _
LastRow + 1 + UBound(WetChem, 2) - 1
ActiveSheet.Range(Astr).Value = Application.WorksheetFunction.Transpose(WetChem)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)